Added P005 in Haskell