Task: Program Execution
Input (English): c, c, N, 5861
Output (English): 4