Task: Program Execution
Input (English): 369, 4951, 5277, q, 87, 9305, 8771, Q, 89, 1381
Output (English): 4, 8