#include <bits/stdc++.h>
int main() {
  long long int x1, y1, x2, y2, dx, dy;
  scanf("%lld %lld", &x1, &y1);
  scanf("%lld %lld", &x2, &y2);
  dx = x1 - x2;
  if (dx < 0) dx = dx * (-1);
  dy = y1 - y2;
  if (dy < 0) dy = dy * (-1);
  if (dx == dy)
    printf("%lld", dx);
  else if (dx > dy)
    printf("%lld", dx);
  else if (dx < dy)
    printf("%lld", dy);
}
