#include <stdio.h>
#include <stdlib.h>
#include <string.h>
int main() {
char c, *ptr, str[256], n[16];
int i = 0, j = 0, len;
long sum = 0;
str[i] = c;
i++;
}
str[i] = '\0';
for (i = 0; i <= len; i++) {
n[j] = str[i];
j++;
if ((str[i] == 32) || (str[i] == '\n')) {
n[j] = '\0';
if ((n[0] == '\0') || (n[0] < 48) || (n[0] > 57)) {
char n[2] = {'0', '\0'};
}
sum
= sum
+ strtol(n
, &ptr
, 10); j = 0;
}
}
}
I2luY2x1ZGUgPHN0ZGlvLmg+CiNpbmNsdWRlIDxzdGRsaWIuaD4KI2luY2x1ZGUgPHN0cmluZy5oPgppbnQgbWFpbigpIHsKCWNoYXIgYywgKnB0ciwgc3RyWzI1Nl0sIG5bMTZdOwoJaW50IGkgPSAwLCBqID0gMCwgbGVuOwoJbG9uZyBzdW0gPSAwOwoJCgl3aGlsZSAoKGMgPSBnZXRjaGFyKCkpICE9IEVPRikgewoJCXN0cltpXSA9IGM7CgkJaSsrOwoJfQoJc3RyW2ldID0gJ1wwJzsKCWxlbiA9IHN0cmxlbihzdHIpOwoJZm9yIChpID0gMDsgaSA8PSBsZW47IGkrKykgewoJCW5bal0gPSBzdHJbaV07CgkJaisrOwoJCWlmICgoc3RyW2ldID09IDMyKSB8fCAoc3RyW2ldID09ICdcbicpKSB7CgkJCW5bal0gPSAnXDAnOwoJCQlpZiAoKG5bMF0gPT0gJ1wwJykgfHwgKG5bMF0gPCA0OCkgfHwgKG5bMF0gPiA1NykpIHsKCQkJCWNoYXIgblsyXSA9IHsnMCcsICdcMCd9OwoJCQl9CgkJCXN1bSA9IHN1bSArIHN0cnRvbChuLCAmcHRyLCAxMCk7CgkJCWogPSAwOwoJCX0KCX0KCXByaW50ZigiXG4lbGRcbiIsIHN1bSk7Cn0=