#include <iostream> using namespace std; int a, n; int main(void) { cin >> a; while (cin >> n, n <= 0); // 空循环 int s = 0; for (int i = 0; i < n; ++i, ++a) s += a; return printf("%d\n", s), 0; }