#include <bits/stdc++.h>
using namespace std;
long long n, m, k, n1, n2, i, j, l, x, coord, p, q;
long long f[100500], t[400500];
long long Abs(long long x) { return x > 0 ? x : -x; }
int main() {
  long long fldgjdflgjhrthrl, fldgjdflgrtyrtyjl, fldggfhfghjdflgjl,
      ffgfldgjdflgjl;
  cin >> fldgjdflgjhrthrl >> fldggfhfghjdflgjl >> fldgjdflgrtyrtyjl >>
      ffgfldgjdflgjl;
  cout << max(Abs(fldgjdflgjhrthrl - fldgjdflgrtyrtyjl),
              Abs(fldggfhfghjdflgjl - ffgfldgjdflgjl))
       << endl;
  return 0;
}
