udpated Haskell code to give answer Int type