#include int abs(int n){ if(n<0){ return -1*n; } return n; } int getSymbol(int n){ if(n<0){ return -1; }else if(n>0){ return 1; }else{ return 0; } } int main(void){ int ex, ey; int tx, ty; int dis; scanf("%d %d", &tx, &ty); scanf("%d %d", &ex, &ey); if(abs(tx) > abs(ty)){ dis = abs(tx); }else{ dis = abs(ty); } if(ex == ey && tx == ty && getSymbol(ex) == getSymbol(tx) && getSymbol(ey) == getSymbol(ty)){ if(abs(tx) > abs(ex)){ dis += 1; } } printf("%d\n", dis); return 0; }