Solves problem 16 in haskell