Solve #53 in Haskell.