module Problem204 where

import Merge
import Prime

lim :: Int
lim = 10 ^ 9

ps :: [Int]
ps = getPrimesUpto 100

hamming :: [Int]
hamming = takeWhile (<= lim) $ 1 : mergeAll' [ [ x * y | x <- hamming ] | y <- ps ]

main :: IO ()
main = print $ length $ takeWhile (<= lim) hamming
