The digital root of a non-negative integer is found by summing its digits, then summing the digits of that result, and so on, until a single digit remains.
Input format
One line: a non-negative integer n.
Output format
One line: the single-digit digital root of n.
Constraints
- 0 <= n <= 1000000000000000000