#!/usr/bin/env python3 # WA: Does not adhere to the imposed limit f <= m n, m = [int(i) for i in input().split()] xs = [int(i) for i in input().split()] # WA: ignore m. m = 1000 # local minimum is whenever s(f) jumps or at f=M # first do f = M optt = 0 for x in xs: if (m * x) % 1000 == 0: optt += (m * x) // 1000 else: optt += 1 + (m * x) // 1000 optt /= m # now all other interesting points fs = {} for x in xs: maxv = (m * x) // 1000 for i in range(1, maxv + 1): f = (i * 1000) / x if not f in fs: fs[f] = 1 else: fs[f] += 1 # enumerate in sorted order # with arbitrary low framerate each level takes 1 frame sf = n for f in sorted(fs): t = sf / f if t < optt: optt = t sf += fs[f] print(optt)