Task: Program Execution
Input (English): S, B, 1549, 763, B, 5089, 7801, 9737, 6425, 415, 8749, J, z
Output (English): 40528