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