Task: Program Execution
Input (English): g, n, 401
Output (English): 0, 1, 4