#include <iostream> using namespace std; int main() { int a, b, sum = 0; cin >> a; while(cin >> b, b <= 0);//for循环不需要在while循环内 for (int i = 0; i < b; i ++) sum += a + i; cout << sum << endl; return 0; }