#include <iostream>
using namespace std;
int main()
{
int sumar=0,numeros;
do
{
cin>>numeros;
if(numeros>0)
{
sumar=sumar+numeros;
}
}
while(numeros!=0);
cout <<sumar<<endl;
return 0;
}
I2luY2x1ZGUgPGlvc3RyZWFtPgp1c2luZyBuYW1lc3BhY2Ugc3RkOwppbnQgbWFpbigpCnsKCWludCBzdW1hcj0wLG51bWVyb3M7CglkbyAKCXsKCQljaW4+Pm51bWVyb3M7CgkJCgkJaWYobnVtZXJvcz4wKQoJCXsKCQkJc3VtYXI9c3VtYXIrbnVtZXJvczsKCQl9Cgl9Cgl3aGlsZShudW1lcm9zIT0wKTsKCWNvdXQgPDxzdW1hcjw8ZW5kbDsKCXJldHVybiAwOwp9