problem 11 solved in haskell