#include <iostream>
using namespace std;
int main(){
long long v, t;
while(cin >> v >> t){
long long t2 = t * 2;
if(t2 == 0 || v == 0){
cout << 0 << endl;
} else {
long long a = v/t2;
long long displacement = v * t2 + (1/2 * a * t2 * t2);
cout << displacement << endl;
}
}
return 0;
}