Task: Program Execution
Input (English): 4949, 5213, 5777, 6299, N, 7433, 8005, 4357
Output (English): 5