N = int(input()) ansls = ['0.'] if N == 0: print(0) exit() l = '142857' for i in range(N): ansls.append(l[i%6]) print(*ansls,sep='')