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