Imagine you are writing a program that will give a prediction for users. Say, you intend to do so based on a number they enter. Write a program that reads a number and prints the sum of its digits. Considering the potential for large input numbers, ensure that the solution is memory-efficient and doesn't store all the digits in memory at once.
An input number and hence the output number are both positive.