i=bin(input())[2:]i=o='0'+i if len(i)%2 else ic=0j=len(i)/2while i!=o or c==0: a='' for x,y in zip(i[:j][::-1],i[j:]):a+=x+y i,c=a,c+1print c
1915195950546866338219593388801304344938837974777392666909760090332935537657862595345445466245217915
329
The brand new service which powers Ideone!
Widget for compiling and running the source code in a web browser!