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