#include using namespace std; int main(){ int a, b, c; cin >> a >> c; if(a == c){ b = a; } else b = a + 1; cout << b << endl; return 0; }