Task: Mathematics
Input (English): 371 # 5382 @ 6187 @ 6588 @ 4139 @ 8505 @ 9678
Output (English): 30086