import Data.List (foldl1, nub) 

main = do
  [n,m] <- map read.words<$>getLine
  as    <- map read.words<$>getLine
  let hlmc = halfLmc as
      fnum = m `div` hlmc
  if even fnum then print $ fnum `div` 2
               else print $ (fnum + 1) `div` 2 
gcd' = foldl1 gcd

rmd xs = let d = gcd' xs
             in nub.map (`div` d) $ xs

halfLmc = foldl (*) 1.rmd