K = int(input()) cnt = 0 for a in [2, 3, 5, 7, 11, 13]: for b in [4, 6, 8, 9, 10, 12]: if a * b == K: cnt += 1 print(f"{cnt / 36:.15f}")