[Haskell-beginners] Question about problem "KAMIL" from SPOJ