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