#include <bits/stdc++.h>
using namespace std;
int main() {
  long long int a, b, c, d, i, j, k, count;
  cin >> a >> b >> c >> d;
  j = abs(a - c), k = abs(b - d);
  if (j < k)
    count = j;
  else
    count = k;
  i = abs(a - c) + abs(b - d) - count * 2;
  count = count + i;
  cout << count;
}
