Task: Program Execution
Input (English): 5345, J, P
Output (English): 2