#include <bits/stdc++.h>
using namespace std;
signed long long X1, Y1;
signed long long X2, Y2;
void solve() {
  int i, j, k, l, r, x, y;
  string s;
  cin >> X1 >> Y1;
  cin >> X2 >> Y2;
  cout << max(abs(X1 - X2), abs(Y1 - Y2)) << endl;
}
int main(int argc, char** argv) {
  string s;
  int i;
  if (argc == 1) ios::sync_with_stdio(false);
  for (i = 0; i < (argc - 1); i++) s += argv[i + 1], s += '\n';
  for (i = 0; i < (s.size()); i++) ungetc(s[s.size() - 1 - i], stdin);
  solve();
  return 0;
}
