#include <bits/stdc++.h>
using namespace std;
const int N = 100001;
struct node {
  long long int a, b;
};
node ang[N];
node anb[N];
bool cmp1(node x, node y) { return x.a < y.a; }
bool cmp(int a, int b) { return a > b; }
struct Tea {
  char name[20];
  int age;
};
Tea node1;
int main() {
  long long int x1, y1;
  long long int x2, y2;
  long long int sum1, sum2;
  cin >> x1 >> y1 >> x2 >> y2;
  sum1 = abs(x1 - x2);
  sum2 = abs(y1 - y2);
  cout << max(sum1, sum2) << endl;
  cin >> sum1;
  return 0;
}
