#include <bits/stdc++.h>
using namespace std;
int main() {
  int x, y, x1, y1, a, b, c, d, e;
  cin >> x >> y >> x1 >> y1;
  a = x1 - x;
  b = y1 - y;
  {
    if (a < 0) {
      c = (-1) * a;
    } else
      c = a;
  }
  {
    if (b < 0) {
      d = (-1) * b;
    } else
      d = b;
  }
  e = max(d, c);
  cout << e;
  return 0;
}
