#include <iostream>
#include <string>
#include <vector>
#include <algorithm>
#include <fstream>
#include <stdexcept>
using namespace std;

inline void keep_window_open() { /*char ch; cin >> ch;*/ }

int main() {
    int sum = 0, number;
    vector<int> numbers;
    string word;
    //ifstream file("file1.txt");
    istream &file = cin;

    while (file >> word) {
        try {
            number = stoi(word);
        }
        catch (const std::exception &) {
            continue;
        }
        numbers.push_back(number);
    }

    if (file.fail() && !file.eof())
    {
	    cout << "failed\n";
    	exit(1);
    }

    for (int x : numbers)
        sum += x;

    cout << sum << "\n";
    keep_window_open();

    return 0;
}