#include <cstdio>
using namespace std;

int main()
{
	char str;
	int ans = 0, save = 0,  x = true;
	
	while (scanf("%c", &str) != EOF){
		if (str >= '0' && '9' >= str){
			if (!x){
				save *= 10;
			}
			save += str - '0';
			x = false;
			//printf("[%d]", ans);
		}
		else {
			ans += save;
			save = 0;
			x = true;
		}
	}
	
	printf("%d\n", ans);
}