#include <bits/stdc++.h>
using namespace std;
int main() {
  int a, b, c, d, n, i, j, s = 0;
  cin >> a >> b;
  cin >> c >> d;
  i = abs(a - c);
  j = abs(b - d);
  s = min(i, j) + abs(i - j);
  cout << s;
  return 0;
}
