Task: Program Execution
Input (English): X, M, 7403, D, 8191, 8767
Output (English): 24, 13, 7403, 4, 8191, 8767