Task: Program Execution
Input (English): 247, 2941, 3147, N
Output (English): 6335