#include #include #include #include using namespace std; int main() { int x1, y1, x2, y2; cin >> x1 >> y1 >> x2 >> y2; int ans = max(x1, y1); if(x1 == y1 && x2 == y2 && x1 > x2) { ans++; } cout << ans << endl; }