Problem 53 solved (Haskell)