n=int(input()) a=round(1/7,n) if n==3 or n==4 or n==5: a-=1/(10**n) print(a)