n = int(input()) if n == 0: print(0) else: a, b = divmod(n, 6) print("0." + "142857" * a + "142857"[:b])