#include <iostream>
using namespace std;
int main() {
int ans;
int a;
while (cin>>a) {
ans=a;
while(cin.get()!='\n'){
cin>>a;
ans+=a;
}
cout << ans << endl;
ans=0;
}
}