EasyRating 900
Digital Root
Repeatedly add the digits of n until one digit remains. Print that digit. n can have up to 1000 digits.
Input
One non-negative integer.
Output
One digit.
Sample 1
Input
38
Output
2
Sample 2
Input
0
Output
0
Output appears here