Task: Program Execution
Input (English): R, N, Q, 5321, w, 5013, 6477, m
Output (English): 1, 2, 3, 5, 8