#include <bits/stdc++.h>
const unsigned int M = 1000000007;
using namespace std;
int main() {
  int x1, y1, x2, y2, ans1, ans2;
  ;
  cin >> x1 >> y1 >> x2 >> y2;
  ans1 = abs(x1 - x2);
  ans2 = abs(y1 - y2);
  if (ans1 > ans2)
    cout << ans1 << endl;
  else
    cout << ans2 << endl;
  return 0;
}
