So you have to do:
11 = 1+1 = 2
3578 = 3+5+7+8 = 23 = 2+3 = 5
But the problem is that the number can be very large(consist of 10,000 digits)
But even with the easiest entrances it doesn't work:
Input : 11
Output: 2798 (and it always changes, but remains a 4-digit number)
Can someone explain why is this happening? And how can I summarize each digit of a very large number?