Task: Program Execution
Input (English): N, 3995, 7857
Output (English): 1