#include <iostream>
#include <cstdio>

using namespace std;

int main()
{
	int input;
	int code = 0;
	
	while (scanf("%*[^0-9]%d", &input) != EOF){
		code += input;
	}
	
	printf("%d\n", code);
	return (0);
}