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