def solve(): n = int(input()) if n == 0: return "0" s = "0." for i in range(n): s += "142857"[i % 6] return s print(solve())