from decimal import Decimal, getcontext, ROUND_HALF_UP primes = [2, 3, 5, 7, 11, 13] composites = [4, 6, 8, 9, 10, 12] K = int(input()) count = 0 for p in primes: for c in composites: if p * c == K: count += 1 if count == 0: print("0.00000000000000000") else: getcontext().rounding = ROUND_HALF_UP prob = Decimal(count) / Decimal(36) formatted = format(prob, '.18f') print(formatted)