#include <bits/stdc++.h>
using namespace std;
int main() {
  int x1, x2, y1, y2, s1, s2;
  cin >> x1 >> x2 >> y1 >> y2;
  y1 - x1 > 0 ? s1 = y1 - x1 : s1 = -1 * (y1 - x1);
  y2 - x2 > 0 ? s2 = y2 - x2 : s2 = -1 * (y2 - x2);
  s1 >= s2 ? cout << s1 : cout << s2;
  return 0;
}
