Task: Mathematics
Input (English): 1006 # 647 @ 3077 # 6724 @ 7954 # 8632 # 254 @ 5192
Output (English): 972