n,m=map(int,input().split()) t=m;ans=0;u=0 while 1>1 u+=1 if u+1<=n: print(ans+n-u) else: print(2**n-1)