using namespace std; int main() { int n , k; cin >> n >> k; int s = 0; for(int i = k ; i <= n; i += k) { s += i; } cout << s; }