problem 1 in haskell