#include <bits/stdc++.h>
using namespace std;
int sx, sy;
int ex, ey;
int main() {
  scanf("%d%d", &sx, &sy);
  scanf("%d%d", &ex, &ey);
  int ans;
  int lenx = abs(ex - sx);
  int leny = abs(ey - sy);
  ans = min(lenx, leny) + lenx - min(lenx, leny) + leny - min(lenx, leny);
  printf("%d\n", ans);
  return 0;
}
