#include <inttypes.h>
#include <ctype.h>
#include <stdio.h>
int main(void)
{
uintmax_t cumsum = 0, n = 0;
for (int c
= EOF
; (c
= getchar()) != EOF
; ) { n = n * 10 + (c - '0');
else if (n) { // complete number
cumsum += n;
printf("%" PRIuMAX
"\n", cumsum
); n = 0;
}
}
if (n)
printf("%" PRIuMAX
"\n", cumsum
+ n
); return feof(stdin
) ? 0 : 1; }
I2luY2x1ZGUgPGludHR5cGVzLmg+CiNpbmNsdWRlIDxjdHlwZS5oPgojaW5jbHVkZSA8c3RkaW8uaD4KCmludCBtYWluKHZvaWQpCnsKICB1aW50bWF4X3QgY3Vtc3VtID0gMCwgbiA9IDA7CiAgZm9yIChpbnQgYyA9IEVPRjsgKGMgPSBnZXRjaGFyKCkpICE9IEVPRjsgKSB7CiAgICBpZiAoaXNkaWdpdChjKSkKICAgICAgbiA9IG4gKiAxMCArIChjIC0gJzAnKTsKICAgIGVsc2UgaWYgKG4pIHsgLy8gY29tcGxldGUgbnVtYmVyCiAgICAgIGN1bXN1bSArPSBuOwogICAgICBwcmludGYoIiUiIFBSSXVNQVggIlxuIiwgY3Vtc3VtKTsKICAgICAgbiA9IDA7CiAgICB9CiAgfQogIGlmIChuKQogICAgcHJpbnRmKCIlIiBQUkl1TUFYICJcbiIsIGN1bXN1bSArIG4pOwogIHJldHVybiBmZW9mKHN0ZGluKSA/IDAgOiAxOwp9Cgo=