Task: Program Execution
Input (English): N, 1981, 4823, b
Output (English): 2