easy 005 in haskell, sloppily