#include <bits/stdc++.h>
#pragma comment(linker, "/STACK:1677721600")
using namespace std;
template <class T>
inline bool in(T &ret) {
  char c;
  int sgn;
  if (c = getchar(), c == EOF) return 0;
  while (c != '-' && (c < '0' || c > '9')) c = getchar();
  sgn = (c == '-') ? -1 : 1;
  ret = (c == '-') ? 0 : (c - '0');
  while (c = getchar(), c >= '0' && c <= '9') ret = ret * 10 + (c - '0');
  ret *= sgn;
  return 1;
}
template <class T>
inline void out(T x) {
  if (x < 0) {
    putchar('-');
    x = -x;
  }
  if (x > 9) out(x / 10);
  putchar(x % 10 + '0');
}
template <class T>
T MAX(T a, T b) {
  return a > b ? a : b;
}
template <class T>
T MIN(T a, T b) {
  return a < b ? a : b;
}
template <class T>
T GCD(T a, T b) {
  return b ? GCD(b, a % b) : a;
}
template <class T>
T LCM(T a, T b) {
  return a / GCD(a, b) * b;
}
const int MAXN = 1000000 + 10;
const int MAXM = 50 + 10;
const double eps = 1e-8;
int main() {
  long long x1, x2, y1, y2;
  cin >> x1 >> y1 >> x2 >> y2;
  long long a = MAX(x1, x2), b = MIN(x1, x2);
  long long c = MAX(y1, y2), d = MIN(y1, y2);
  long long ans1 = MIN(a - b, c - d), ans2 = MAX(a - b, c - d);
  cout << ans2 << endl;
  return 0;
}
