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