suma = 0 a = float(input()) while a != 0: if a > 0: suma = suma + a else: suma = suma a = float(input()) print(suma)