Task: Program Execution
Input (English): f, 87, 301, 337, z, r, k, p
Output (English): 0, 1, 3, 7, 8