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