I would like to count the total of a increasing numbers They look like this: 
3
4
5
7
9
11
4
5
8
10
5
8
9

So i need the sum of the increase in value, for this example that would be: (11-3)+(10-4)+(9-5)= 8+6+4=18.

Is there a simple way to do this with code?