#include <bits/stdc++.h>
using namespace std;
int main() {
  long long x1, y1, x2, y2;
  long long temp1, temp2;
  while (cin >> x1 >> y1) {
    cin >> x2 >> y2;
    if (x1 > x2)
      temp1 = x1 - x2;
    else
      temp1 = x2 - x1;
    if (y1 > y2)
      temp2 = y1 - y2;
    else
      temp2 = y2 - y1;
    if (temp1 > temp2)
      cout << temp1 << endl;
    else
      cout << temp2 << endl;
  }
}
