Finding sum of digits of a number