Task: Program Execution
Input (English): n, z, 5785, 1167, 1039
Output (English): 3, 4, 5