#include <iostream>
using namespace std;

int main () {
    int A,B;
    cin>>A>>B;
    A=A+2;
if (A>>B) {
    cout<<"2";
    return 0;
}
if (A<<B) {
    cout<<"3";
   return 0;
}
     return 0;
}
    