//misis4 taskC #define _CRT_SECURE_NO_WARNINGS #include #include #include #include #include #include #include #include #include #include #define F first #define S second using namespace std; const long double eps = 0.000000005; const long double pi = 3.1415926535897932; const long double inf = 1e9; int main() { ios_base::sync_with_stdio(0); //freopen("bigwall.in", "r", stdin); freopen("bigwall.out", "w", stdout); //freopen("input.txt", "r", stdin); int a, b; cin >> a >> b; cout << (a + b) * (b - a + 1) / 2 << endl; return 0; }