#include <bits/stdc++.h>
using namespace std;
int main() {
  int x, y, z, sum = 0, c = 1, max, min;
  cin >> x;
  cin >> y;
  if (x > y) {
    max = x;
    min = y;
  } else {
    max = y;
    min = x;
  }
  z = (x + y) / 2;
  for (int i = 1; i <= abs(x - y); ++i) {
    if (i % 2 != 0) {
      if (max >= z) {
        sum += c;
        max--;
      }
    }
    if (i % 2 == 0) {
      if (min < z) {
        sum += c;
        min++;
      }
      c++;
    }
    cout << sum << endl;
  }
  cout << sum;
  return 0;
}
