Task: Program Execution
Input (English): 7957 X D 7861 d 1749 n 5001 2449 P 6403 9351 4897 q 8293 y 7371 9841 Z P B 6745 1753 2849 l 4783 5865 Z e 8671 P Q
Output (English): 17