#include <bits/stdc++.h>
using namespace std;
int main() {
  long long int a, b;
  long long int c, d;
  cin >> a >> b >> c >> d;
  long long int x = 0;
  long long int y = 0;
  x = max(a, c) - min(a, c);
  y = max(b, d) - min(b, d);
  cout << max(x, y) << "\n";
  return 0;
}
