In [ ]:
m=0
while ture:
    a=int(input(''))
    while a!=' ':
        m=m+a
    while a=' ':
        printf(m)

In [ ]: