Solution for Happy Number challenge.