#include <bits/stdc++.h>
using namespace std;
int main() {
  int s[2], f[2], x, y;
  cin >> s[0] >> s[1] >> f[0] >> f[1];
  x = abs(f[0] - s[0]);
  y = abs(f[1] - s[1]);
  if (x >= y) {
    cout << y + (x - y);
    return 0;
  } else if (y > x) {
    cout << x + (y - x);
    return 0;
  }
}
