#include <bits/stdc++.h>
int abs(int x) {
  if (x >= 0) return x;
  return -x;
}
int main() {
  int a, b, c, d, n1, n2, n3;
  scanf("%d %d %d %d", &a, &b, &c, &d);
  n1 = abs(c - a);
  n2 = abs(d - b);
  n3 = abs(n1 - n2);
  if (n2 < n1) n1 = n2;
  printf("%d", n1 + n3);
  return 0;
}
