#include<cstdio> #include<iostream> using namespace std; int main() { int a,n,sum=0; cin>>a; while(cin>>n,n<=0);//逗号表达式取逗号后的值 for(int i=0;i<n;i++) { sum+=a+i; } cout<<sum; }