#include <bits/stdc++.h>
const int N = 1e6 + 5, MAX = 3e7, MOD = 1e9 + 7;
using namespace std;
int xx1, yy1, xx2, yy2;
int main() {
  ios_base::sync_with_stdio(false);
  cin.tie(NULL);
  cin >> xx1 >> yy1 >> xx2 >> yy2;
  cout << max(abs(xx1 - xx2), abs(yy1 - yy2)) << "\n";
}
