import qualified Data.Map as M
import Data.Ratio
import Data.List

main = do
  [_,a] <- map read . words <$> getLine
  xs <- sort . map read . words <$> getLine
  print (tak (a%1) xs)

tak a = M.findWithDefault 0 a . foldr dp (M.singleton 0 (0 :: Integer))

dp x m = M.unionWith (+) m (mapKeyValue (asum x) succ m)

asum x k
  | k == 0 = x%1
  | otherwise = (x + numerator k) % (1 + denominator k)

mapKeyValue f g = M.fromListWith (+) . map (\(k,v) -> (f k, g v)) . M.toList