#include <bits/stdc++.h>
using namespace std;
int main() {
  int x1, y1, x2, y2;
  cin >> x1 >> y1 >> x2 >> y2;
  int dif1, dif2;
  dif1 = abs(x1 - x2);
  dif2 = abs(y1 - y2);
  if (dif1 > dif2)
    cout << dif1;
  else
    cout << dif2;
  return 0;
}
