#include <iostream>
using namespace std;

int main() {

    string str;
    int s[103] = {0};
    int i, j;
    while (cin >> str && str.size() != 1) {

        //累和存到s数组
        for ( i = str.size() - 1, j = 102; i >= 0 ; i--) {
            s[j--] += str[i] - '0';
        }

        //进位
        for (i = 102; i >= 0; i--) {
            if (s[i] >= 10) {
                s[i - 1] += s[i] / 10;
                s[i] %= 10;
            }
        }

    }
    //输出
    i = 0;
    while (s[i] == 0)i++;
    for (i; i < 103; i++) {
        cout << s[i];
    }
    cout << endl;
}