#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) ans++; cout << ans << endl; }