#include <stdio.h>
#include <string.h>

int main() {

    char a[20];

    fgets(a, sizeof(a), stdin);

    int y=0;

    for(int f=0; f<20; f++)
    {
        if( a[f] >= 48 && a[f] <= 57)
        {
            y = y + a[f]-48;
        }
    }

    printf("%d\n", y);
    return 0;
}

Embed on website

To embed this project on your website, copy the following code and paste it into your website's HTML: