cont = 0
n = 0
total = 0
while True:
n = int(input("Digite 999 para parar"))
if n == 999: break
cont += 1
total += n
print(total)
#https://pt.stackoverflow.com/q/350241/101
Y29udCA9IDAKbiA9IDAKdG90YWwgPSAwCndoaWxlIFRydWU6CiAgICBuID0gaW50KGlucHV0KCJEaWdpdGUgOTk5IHBhcmEgcGFyYXIiKSkKICAgIGlmIG4gPT0gOTk5OiBicmVhawogICAgY29udCArPSAxCiAgICB0b3RhbCArPSBuCnByaW50KHRvdGFsKQoKI2h0dHBzOi8vcHQuc3RhY2tvdmVyZmxvdy5jb20vcS8zNTAyNDEvMTAx