import Data.Function (on)

allLcm::[Int]->Int
allLcm an = foldl1 lcm an

div' = (/) `on` fromIntegral

oddCount::Int->Int
oddCount n = ceiling $ div' n 2

main = do
  [n, m] <- map read . words <$> getLine
  an <- map read . words <$> getLine
  print $ oddCount (div m (allLcm $ map (`div` 2) an))
