Task: Program Execution
Input (English): 1971, 6145, 8747, N, 8879, g, h
Output (English): 25742