N = input() a = N // 6 b = N % 6 r = '' for i in range(a): r = r + '142857' if b > 0: r =r + '142857'[:b-1] print(f'0.{r}')