#include <stdio.h>

int getnum(void) {
    int ch, n = 0;

    int stack[10] = {0}; // ceil(log_10(2^31))
    int i = 0;
    while ((ch = getchar()) != '\n') {
        int x = ch - '0';
        if (x < 0 || x > 9) {
            continue;
        }
        if (i <= 9) stack[i++] = x; // stack push
    }

    int d = 1;
    for (int j = i - 1; j >= 0; j--) {
        n += stack[j] * d; // stack pop
        d = d * 10;
    }

    return n;
}

int main(void) {
    int ret = getnum();

    printf("got: %d\n", ret);

    return 0;
}
