#include <bits/stdc++.h>
using namespace std;
int main() {
  int a, b, n;
  cin >> a >> b;
  if ((b - a) & 1) {
    n = (b - a) / 2;
    cout << (n + 1) * (n + 1);
  } else {
    n = (b - a) / 2;
    cout << n * (n + 1);
  }
  return 0;
}
