import sys from decimal import Decimal, getcontext getcontext().prec = 25 # Sufficient precision to handle 18 decimal places prime = [2, 3, 5, 7, 11, 13] composite = [4, 6, 8, 9, 10, 12] K = int(sys.stdin.readline()) count = 0 for p in prime: for c in composite: if p * c == K: count += 1 probability = Decimal(count) / Decimal(36) # Format to 18 decimal places print("{0:.18f}".format(probability))