#include <bits/stdc++.h>
using namespace std;
void show(int n) {
  cout << n << endl;
  exit(0);
}
int main() {
  int x1, y1, x2, y2;
  scanf("%d%d", &x1, &y1);
  scanf("%d%d", &x2, &y2);
  int dx = abs(x2 - x1), dy = abs(y2 - y1);
  if (dx * dy == 0) show(dx + dy);
  show(max(dx, dy));
}
