#include <bits/stdc++.h>
using namespace std;
int X[2], Y[2], x, y;
int main() {
  scanf("%d%d%d%d", &X[0], &Y[0], &X[1], &Y[1]);
  x = abs(X[1] - X[0]), y = abs(Y[1] - Y[0]);
  printf("%d\n", max(x, y));
  return 0;
}
