#include <iostream>
using namespace std;
int main() {
int x;
int sum = 0;
while (x != 0) {
cin >> x;
sum += x;
}
cout << sum << '\n';
#include <iostream>
using namespace std;
int main() {
int x;
int sum = 0;
while (x != 0) {
cin >> x;
sum += x;
}
cout << sum << '\n';
}