You have been given N natural numbers X1 , X2 , ... XN . Let us define Yi to be:
Yi = F(Xi) , where F(Xi) is calculated in the following recursive manner:
F(Xi) {
if (Xi == 0) return (0);
else return (F(Xi / 10) + Xi % 10);
}
You have to now find the value of:
(Y1 + Y2 + .... + YN) % 9 - (F(X1 + X2 + .... + XN)) % 9
First line consist of N. The next N lines are such that the ith line consists of a single natural number Xi.
Print a single line consisting of the computed value.
2 <= N <= 10,000
1 <= Xi <= 1010,000