import sys n=int(input()) if n==0: print(0) else: s='142857' sys.stdout.write('0.') for i in range(n): sys.stdout.write(s[i%6]) print('')