a:=File standardInput readLine asNumber*2 while(1<=a=(a%1*2*(a%2-1)+a)/2,a asString(0,1)println)