You will be given a definition of a task first, then some input of the task.
In this task you will be given an arithmetic operation in Italian and you have to find its answer. The operations 'addition' and 'subtraction' have been replaced with their italian translations i.e you need to perform addition when you see 'aggiunta' and subtraction in case of 'sottrazione'.

8504 aggiunta 1200 sottrazione 5788 aggiunta 4265 sottrazione 6817
Output:
1364