#41477: c++解答


austin970205@gmail.com (204鄭源鈞)


#include<bits/stdc++.h>
using namespace std;
int main(){
    int n,m;
    while(cin>>n>>m){
        if(n==m)cout<<m<<endl;
        else cout<<m+1<<endl;
    }
}