Bojji is a prince that loves to help his people. Unfortunately, his people fell into debt, so he devised a new way to calculate their bills. As Bojji is very small in size he wanted the numbers to represent him so he decided to compress the numbers using his triedandtrue method ADDITION!
Bojji only knows numbers from $0$ to $9$ since he is very young, so after adding up all the bills on his trusty calculator, he splits his answer back into single digits and adds them all up, he called this method the KAGE method.
Your task is to reuse the KAGE method until one digit is left.
The first line contains a single integer $n$ ($1 \le n \le 10^5$) which is the total number of bills.
The second line contains $n$ integers $a_1$, $a_2$, …, $a_n$ ($0 \le a_i \le 10^{18}$) which is the cash value of the bill $a_i$.
The output should be Bojji's solution.
Input  Output 

3 1 2 3 Copy

6 Copy

2 44 55 Copy

9 Copy
