N=int(input()) X,Y=mat(int,input().split()) X,Y,N=min(X,Y)*1000,maxn(X,Y)*1000,0 while X>H: X,H,N=X/2,H*2,N+1 while Y>H: Y,H,N=Y/2,H*2,N+1 print(N)