#include using namespace std; #define rep(i,a,b) for(int i=a;i> x >> y; int x2, y2; cin >> x2 >> y2; int ans = max(x, y); if (x == y && x2 == y2) { if (min(x, 0) < x2 && x2 < max(x, 0)) ans++; } cout << ans << endl; }