#include <bits/stdc++.h>
using namespace std;
int main() {
  double a, b, diff, mid, n, ans;
  cin >> a >> b;
  diff = abs(a - b);
  mid = (diff / 2);
  n = ceil(mid);
  ans = n * n;
  cout << ans;
  return 0;
}
