from decimal import Decimal, ROUND_HALF_UP, getcontext getcontext().rounding = ROUND_HALF_UP K = int(input()) if K == 0: print("0.000000000000000000") else: primes = [2, 3, 5, 7, 11, 13] composites = {4, 6, 8, 9, 10, 12} count = 0 for p in primes: if K % p != 0: continue c = K // p if c in composites: count += 1 prob = Decimal(count) / Decimal(36) formatted = prob.quantize(Decimal('1.000000000000000000'), rounding=ROUND_HALF_UP) print(formatted)