N = int(input()) S = ["0","."] now = 1 if N == 0: print(0) exit() for i in range(N): now *= 10 S.append(str(now//7)) now %= 7 print("".join(S))