#include <bits/stdc++.h>
#pragma warning(disable : 4996)
const long long MOD = 1000000007;
using namespace std;
void solve() {
  int a, b, c, d;
  scanf("%d%d%d%d", &a, &b, &c, &d);
  c -= a;
  d -= b;
  printf("%d\n", ((abs(c)) < (abs(d)) ? (abs(d)) : (abs(c))));
  return;
}
int main(int argc, char* argv[]) {
  solve();
  return 0;
}
