#include <bits/stdc++.h>   using namespace std;   int main() {     long long a, b;     cin >> a >> b;     long long d = abs(a - b);     long long p1 = (d + 1) / 2, p2 = d / 2;     long long s1 = (p1 * (p1 + 1)) / 2, s2 = (p2 * (p2 + 1)) / 2;     cout << s1 + s2;   }   