Task: Program Execution
Input (English): h w K n K Z Z 9153 5807 2059 5531 H E 5427 r N O 4899 L 8831 7595 y 6597 g S j W 2783 5277 3643 2589 Q 2791
Output (English): 14