Task: Program Execution
Input (English): k, 107, 333, 317, m, w, g, f
Output (English): 0, 1, 3, 7