The c-sum of a number is determined by calculating the digits of this number and repeating this procedure until the number finally consists of one digit. As a result, the c-sum of a number is a digit $$c$$ ($$1 \leq c \leq 9$$). For example, we have:

c-sum(8) = 8
c-sum(377096267) = c-sum(47) = c-sum(11) = 2

Assignment

Write a function csum that takes a number $$n$$ (int) as its argument. The function must return the c-sum of $$n$$ (int).

Example

>>> csum(8)
8
>>> csum(377096267)
2