N = int(input()) if N == 0: print(0) else: res = "142857" * N print("0." + res[: N + 2])