#include <bits/stdc++.h> using namespace std; int main() { int n, m, i, s; cin >> n >> m >> s; s = 0; i = m; while (i <= n) { if (i % 7 == 0) s = s + i; i++; } cout << s; }