#include <bits/stdc++.h>
using namespace std;
int main()
{
int sum = 0, n;
while (cin >> n && n > 0)
sum += n;
}
cout << sum << endl;
return 0;