#include <bits/stdc++.h>
using namespace std;
int main() {
  int xi, yi, xj, yj;
  cin >> xi >> yi >> xj >> yj;
  int a = abs(xi - xj), b = abs(yi - yj);
  cout << min(a, b) + (max(a, b) - min(a, b)) << endl;
  return 0;
}
