#include <iostream>
using namespace std;
int main()
{
int A, B;
cin >> A >> B;
if (A > B) {
cout << A << endl;
}
else {
cout << B + 1 << endl;
}
return 0;
}
#include
using namespace std;
int main()
{
int A, B;
cin >> A >> B;if (A > B) {
cout << A << endl;
}
else {
cout << B + 1 << endl;
}
return 0;
}