main = do let d31 = [(x,y) | x <- [1,3,5,7,8,10,12], y <- [1..31], x == (y `div` 10) + (y `mod` 10)] let d30 = [(x,y) | x <- [4,6,9,11], y <- [1..30], x == (y `div` 10) + (y `mod` 10)] let d28 = [(x,y) | x <- [2], y <- [1..28], x == (y `div` 10) + (y `mod` 10)] putStrLn . show $ length d31 + length d30 + length d28