#include <stdio.h> #include <stdlib.h> int main() { int n,m,i; while(scanf("%d %d",&n,&m)!=EOF){ if(n!=m)printf("%d\n",m+1); else if(n==m)printf("%d\n",m); } return 0; }