Task: Program Execution
Input (English): d, i, x, c, 9843, 9971, 8471, 765, 1995
Output (English): 5