#include using namespace std; int main(){ long long a, b; cin >> a >> b; double l = (a / 5000.0) * 200000; double r = ((a+1)/5000.0) * 200000; if(l <= b && b < r){ cout << 1 << endl; }else{ cout << 2 << endl; } return 0; }