#include #include using namespace std; int main() { int x, y, x2, y2; cin >> x >> y >> x2 >> y2; if (abs(x) == abs(y)) { if (abs(x2) == abs(y2)) { if (x > x2) { cout << x + 1 << endl; } else { cout << x << endl; } } else { cout << x << endl; } } else if (x > y) { cout << x << endl; } else { cout << y << endl; } return 0; }