#include using namespace std; #include using namespace atcoder; using ll=long long; using Graph=vector>>; #define INF 1000000000000000000 #define MOD 998244353 #define MAX 1000000 int main(){ ll N,M; cin>>N>>M; ll ans=0; if(N<=30&&(1<<(N-1))<=M){ ans=(1LL<0){ if(M==1){ ans+=N; break; } ans+=M; M=(M+1)/2; N--; } } cout<