N = int(input()) if N == 0: print(0) else: print('0.', end='') ans = '142857' * 10 ** 5 print(ans[:N])