Read integer n. Repeatedly sum its digits until a single digit remains. Print the result.
Write a complete program: read the input with input() and print the result with print().
input()
print()
Input
9875
Output
2