import itertools DIGITS = "142857" def solve(n): if n == 0: return "0" else: return "0." + "".join(c for _, c in zip(range(n), itertools.cycle(DIGITS))) def main(): print(solve(int(input()))) if __name__ == '__main__': main()