As you know, to verify licensed software, serial numbers and registration keys are used. You, as a leading developer of license verification systems, have developed a reliable system. It is based on the digital roots of numbers. Now you need to write a program that determines the digital root of a given number.
The digital root of an arbitrary number is defined as follows:
If the sum of its digits is less than , then the digital root is the sum of the digits of that number.
Otherwise, the digital root of a number is equal to the digital root of the sum of its digits.
The only number (0 \leq n \leq 2^{31} - 1).
Print one number — the answer to the challenge.
Example 1