What is the return value of the following function?

#include <stdio.h>

int mystery(int x) {
    if (x == 0)
        return 0;
    else
        return x % 10 + mystery(x / 10);
}

int main() {
    printf("%d\n", mystery(123));
    return 0;
}

Output:

6