N = input() if N == 0: print(0) else: a = N // 6 b = N % 6 r = '142857' #r = r + '142857'[:b] print(f'0.{r*a}{r[:b]}')