reading multiple lines of input in sum of digits

How do I read multiplle lines of input. My logic works for one line.

n=int(input())
sum = 0
while(n > 0):

print(sum)

Take input again in the loop
Try to dry run, and you will understand