#include #include #include using namespace std; int main(){ int x, y, x1, y1; int ans; cin >> x >> y >> x1 >> y1; if (x > y){ ans = x; } else{ ans = y; } if (x == y&&x1 == y1&&x > x1){ ans += 1; } cout << ans << endl; return 0; }