Digital Root
Repeatedly replace by the sum of its digits until a single digit remains. Print that digit.
Input
A single integer .
Output
The digital root.
Constraints
Sample 1
Input
9875
Output
2
Sample 2
Input
0
Output
0
Repeatedly replace by the sum of its digits until a single digit remains. Print that digit.
A single integer .
The digital root.
Input
9875
Output
2
Input
0
Output
0