// No.208 王将 // https://yukicoder.me/problems/no/208 // #include #include using namespace std; int main() { std::cin.tie(nullptr); std::ios::sync_with_stdio(false); int x, y; cin >> x >> y; int ox, oy; cin >> ox >> oy; int ans = max(x, y); if (x == y && ox == oy && x > ox) ++ans; cout << ans << endl; }