2 3
1 5
2 3
8
In the first sample, in order to obtain the optimal answer, you should act as follows.
On the first day collect 3 fruits from the 1-st tree.
On the second day collect 1 fruit from the 2-nd tree and 2 fruits from the 1-st tree.
On the third day collect the remaining fruits from the 2-nd tree.