Task: Program Execution
Input (English): n, B, w, 6751, L, m, 6103
Output (English): 4, 7