P = [2, 3, 5, 7, 11, 13] K = int(input()) ans = 0 for i in (4, 6, 8, 9, 10, 12): if K % i == 0 and K // i in P: ans += 1 print(ans / 36)