Task: Program Execution
Input (English): H, w, B, 9739, N, k, W
Output (English): 6