N=int(input()) if N==0: print("0") else: print("0."+('142857'*(N//6+1))[:N])