#include <bits/stdc++.h>
using namespace std;
using ll = long long;
using lb = long double;
using db = double;
const ll mod = 1e9 + 7;
int n, m, k, s;
const long double pi = 2 * asin(1.0);
const int maxn = 300000 + 5;
int num[maxn];
int main() {
  ll a, b;
  ll c, d;
  cin >> a >> b >> c >> d;
  ll re = max(llabs(a - c), llabs(b - d));
  cout << re << '\n';
  return 0;
}
