#include<iostream> using namespace std; int sum(int l, int r) { int sum = l; for(int i = l + 1;i <= r;i ++) sum += i; return sum; } int main() { int l, r; cin >> l >> r; cout << sum(l, r) << endl; return 0; }