#include using namespace std; int main(){ unsigned long long int A,C,B; cin >> A >> C; B=A+1; if(B==C) B++; cout << B; }