/******************************************************************************
Online C Compiler.
Code, Compile, Run and Debug C program online.
Write your code in this editor and press "Run" button to compile and execute it.
*******************************************************************************/
#include <stdio.h>
#include <string.h>
#include <ctype.h>
#include <stdlib.h>
#define N 255
int main()
{
char buf[N];
fgets(buf, N, stdin);
int len = strlen(buf);
int sum = 0;
for(int i = 0; i < len; i++)
{
if (isdigit(buf[i]))
{
sum += atoi(&buf[i]);
while (isdigit(buf[i]))
i++;
}
}
printf("Sum: %d\n", sum);
return 0;
}