#include <bits/stdc++.h>
using namespace std;
const double PI = acos(-1.0);
const double eps = 1e-6;
const int mod = 1000000000 + 7;
const int INF = 1000000000;
const int maxn = 100;
int T, n, m;
long long x, y, a, b;
int main() {
  scanf("%I64d%I64d%I64d%I64d", &x, &y, &a, &b);
  int l = abs(x - a);
  int w = abs(y - b);
  long long ans = max(l, w);
  printf("%I64d\n", ans);
  return 0;
}
