Given non-negative integers representing an elevation map where the width of each bar is .
Compute how much water it can trap after raining.
The first line contains the value of .
The second line contains non-negative integers .
Print how much water can be trapped after raining.