#include<iostream>
#include<cstdio>
using namespace std;
int main()
{
int A , N;
cin >> A;
while(cin >> N , N <= 0); //先读入N,再判断N是否小于等于0 如果N小于等于0 就继续循环
int sum = 0;
for(int i = 0; i < N ; i++)
{
sum += A + i;
}
cout << sum << endl;
return 0;
}