#include #include #include #include #include #include #include #include #include #include #include #include typedef long long ll; using namespace std; #define mod 1000000007 #define INF 1000000000 //(int)1e9 #define LLINF 2000000000000000000 //(ll)2e18 #define PI 3.1415926536 #define SIZE 100000 int gcd(int a,int b){ if(a==0) return b; return gcd(b%a,a); } int main(){ int x,y,x2,y2; int a,b,ans; cin >> x >> y >> x2 >> y2; if(x==y && x2==y2){ ans = max(abs(x),abs(y))+1; }else{ ans = max(abs(x),abs(y)); } cout << ans << endl; return 0; }