#include <bits/stdc++.h>
int main() {
  long long a, b, c, d, x, y, z;
  scanf("%lld %lld %lld %lld", &a, &b, &c, &d);
  x = c - a;
  y = d - b;
  x = abs(x);
  y = abs(y);
  z = x > y ? x : y;
  printf("%lld\n", z);
  return 0;
}
