def solve(): n = int(input()) if n == 0: return "0" return "0." + "142857" * (n // 6) + "142857"[: n % 6] print(solve())