Task: Program Execution
Input (English): x, X, 31, X, 3017, 1247, 6707, K, 1371, 951, 8657, k, K, 4177, 4247
Output (English): 30405