#include <bits/stdc++.h>
using namespace std;
int main() {
  int a, b, x, y;
  cin >> a >> b >> x >> y;
  x = abs(a - x);
  y = abs(b - y);
  (x > y) ? cout << x << endl : cout << y << endl;
  return 0;
}
