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