Solve 17 in haskell