N = int(input()) if N ==0: print(0) exit() S = '142857'*10**5 print('0.'+S[:N])