EasyRating 800
Tram Capacity
At each stop a passengers get off and then b get on. The tram is empty at the start and at the end. Print the minimum capacity needed.
Input
n, then n lines 'a b'.
Output
A number.
Sample 1
Input
4 0 3 2 5 4 2 4 0
Output
6
Sample 2
Input
2 0 0 0 0
Output
0
Output appears here