#!/usr/bin/env python3 # TLE: does not sort the list and insted recomputes for each interesting framerate. n, m = [int(i) for i in input().split()] xs = [int(i) for i in input().split()] # 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): # DO NOT enumerate in sorted order -> TLE # recalculate frames each time t = 0 for y in xs: # f = 1000i/xi # fs = fy/1000 = iy/xi if (i * y) % x == 0: t += (i * y) // x else: t += 1 + (i * y) // x t /= (1000 * i) / x if t < optt: optt = t print(optt)