n = int(input()) N = 10**n seven = N//7 print(1-(N-seven)/N)