d=10**9 n=int(float(input())*d) a=0 while n:a,n,d=a+1,d%n,n print(a)