#include<bits/stdc++.h>
using namespace std;
typedef long long ll;
#define pb push_back
#define fi first
#define se second
typedef pair<ll,ll> P;
#define Mod 1000000007
using VP = vector<P>; using VVP = vector<VP>;
using VI = vector<ll>; using VVI = vector<VI>; using VVVI = vector<VVI>;
#define INF 12345678901234

int main(){
    ll a,b;
    cin>>a>>b;
    ll b1=a*40;
    ll b2=a*40*40;
    if(abs(b1-b)<abs(b2-b)) cout<<1<<endl;
    else cout<<2<<endl;
    return 0;
}