#include <bits/stdc++.h>
#pragma GCC optimize("Ofast,unroll-loops")
#pragma GCC target("avx,avx2,fma")
using std::cin;
using std::cout;
using std::vector;
using ll = long long;
using real = long double;
using pii = std::pair<int, int>;
using pll = std::pair<ll, ll>;
using vi = vector<int>;
using vll = vector<ll>;
using vvi = vector<vi>;
using vvll = vector<vll>;
using vpii = vector<pii>;
using vpll = vector<pll>;
const auto ready = []() {
  cin.tie(0);
  cout.tie(0);
  std::ios_base::sync_with_stdio(false);
  return true;
}();
const int mx = 8e6 + 10;
const int high = 22;
static int dp[mx];
void process(int x, int &agent) {
  if (dp[x] != -1 || !x) return;
  dp[x] = agent;
  for (int i = 0; i < high; ++i)
    if (x & (1 << i)) process(x ^ (1 << i), agent);
}
int main() {
  int x1, y1, x2, y2;
  cin >> x1 >> y1 >> x2 >> y2;
  cout << std::max(std::abs(x2 - x1), std::abs(y2 - y1)) << "\n";
  return 0;
}
