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