Problem 21 (Haskell)