fork download
  1. x=int(input())
  2. suma=0
  3. while x!=0:
  4. if x>0: suma+=x
  5. x=int(input())
  6. print(suma)
Success #stdin #stdout 0.12s 14112KB
stdin
-10
15
20
0
stdout
35