import           Control.Exception (assert)
import           Data.List         (foldl')

main :: IO ()
main = do
  [n, m] <- map read . words <$> getLine
  as <- map read . words <$> getLine
  assert (length as == n) $
    print $ solve m as

solve :: Int -> [Int] -> Int
solve m as = (m - semiLcm) `div` (2 * semiLcm) + 1
  where
    semiLcm = foldl' lcm 1 $ map (`div` 2) as
