from decimal import * n = int(input()) N = 10**n seven = N//7 print(Decimal(1-Decimal((N-seven)/N)))