#include <bits/stdc++.h>
int main(void) {
  int x1, y1, x2, y2;
  scanf("%d%d%d%d", &x1, &y1, &x2, &y2);
  int dx = abs(x1 - x2);
  int dy = abs(y1 - y2);
  if (dx >= dy)
    printf("%d\n", dx);
  else
    printf("%d\n", dy);
  return 0;
}
