for (int i = 0; i < strlen(str); ++i) {
if (isnumber(str[i])) {
int j = i;
while (isnumber(str[j])) {
if (maxnumber < str[j] - '0') {
maxnumber = str[j] - '0';
}
++j;
}
for (; i < j; ++i) {
number += pow(maxnumber + 1, j - i - 1) * (str[i] - '0');
}