N = int(input()) if N == 0: print(0) else: ans = '0.' s = '142857' for n in range(N): ans += s[n%6] print(ans)