Task: Program Execution
Input (English): w, 7571, J, 1849, k, 9291, d, 9811, x, 7721
Output (English): 5