Task: Program Execution
Input (English): z, 3387, g, 3845, N, T, 2863, p
Output (English): 5