import sys # sys.setrecursionlimit(200005) int1 = lambda x: int(x)-1 pDB = lambda *x: print(*x, end="\n", file=sys.stderr) p2D = lambda x: print(*x, sep="\n", end="\n\n", file=sys.stderr) def II(): return int(sys.stdin.readline()) def LI(): return list(map(int, sys.stdin.readline().split())) def LLI(rows_number): return [LI() for _ in range(rows_number)] def LI1(): return list(map(int1, sys.stdin.readline().split())) def LLI1(rows_number): return [LI1() for _ in range(rows_number)] def SI(): return sys.stdin.readline().rstrip() dij = [(0, 1), (-1, 0), (0, -1), (1, 0)] # dij = [(0, 1), (-1, 0), (0, -1), (1, 0), (1, 1), (1, -1), (-1, 1), (-1, -1)] inf = (1 << 63)-1 # md = 10**9+7 md = 998244353 from copy import deepcopy n, l = LI() fac = [1] for i in range(1, n+1): fac.append(fac[-1]*i) pp = [0]*n for i in range(n): pp[i] = fac[i]*fac[n-1-i]/fac[-1] l *= 60 ss = SI().split() ss = [int(s[0:2])*60+int(s[3:5]) for s in ss] tot = sum(ss) if tot <= l: print(n) exit() dp = [[0]*l for _ in range(n+1)] dp[0][0] = 1 for si, s in enumerate(ss): for i in range(si+1, 0, -1): for j in range(s, l): dp[i][j] += dp[i-1][j-s] # p2D(dp) ans = 0 for s in ss: cdp = deepcopy(dp) for i in range(n): for j in range(l): if i and j >= s: cdp[i][j] -= cdp[i-1][j-s] ans += cdp[i][j]*pp[i] print(f"{ans:.10f}")