#include <bits/stdc++.h>
int main(void) {
  long x1, y1, x2, y2, count = 0;
  long diffx, diffy;
  scanf("%ld %ld", &x1, &y1);
  scanf("%ld %ld", &x2, &y2);
  diffx = x2 - x1;
  diffy = y2 - y1;
  if (diffx < 0) diffx *= -1;
  if (diffy < 0) diffy *= -1;
  if (diffx > diffy)
    count = diffx;
  else
    count = diffy;
  printf("%ld", count);
  return 0;
}
