#include <bits/stdc++.h>
using namespace std;
const int MAX_N = 1e6 + 10;
int a[MAX_N];
int b[MAX_N];
int res;
const int BUFSIZE = MAX_N;
char buf[BUFSIZE + 1];
string nextString() {
  scanf("%s", buf);
  return buf;
}
int main() {
  long long x1, y1, x2, y2;
  cin >> x1 >> y1 >> x2 >> y2;
  long long dx = abs(x1 - x2);
  long long dy = abs(y1 - y2);
  cout << max(dx, dy) << endl;
  return 0;
}
