#include <bits/stdc++.h>
static inline int popcount(int x) { return __builtin_popcount(x); }
template <class T, class U>
static inline std::pair<T, U> mp(const T& a, const U& b) {
  return std::make_pair(a, b);
}
int main() {
  int a, b, c, d;
  std::scanf("%d %d %d %d", &a, &b, &c, &d);
  int diff1 = std::abs(c - a);
  int diff2 = std::abs(b - d);
  std::cout << std::max(diff1, diff2) << std::endl;
  return 0;
}
