Teachers and parrents

Instructions:

The table describes the number of passengers entering and leaving at stations A, B, C ... Bus arrives without passengers at the first station. All passengers get off on the last station. We do keep rules of decency - first get off and then get in.

Example

 
A
B
C
D
E
 got off 
0 0
9 15
 got on 
0 1
0 5
7 8
0 0
 in bus
4 7
2 8
 altogether
7


Solution

 
A
B
C
D
E
 got off 
0 0
2 3
0 2
0 1
9 15
 got on 
4 7
0 1
0 5
7 8
0 0
 in bus
4 7
2 5
2 8
9 15
 altogether
11
7
10
24


Solve exercises