To add digits of a given number