The Jewelry Art Gallery (JAG) building has a long corridor running east to west. A window sits on the north side of the corridor, and N windowpanes are mounted in it. Each pane is W wide and H tall. Measured from the west edge of the window, the i-th pane from the west covers the horizontal range from W×(i−1) to W×i.

Figure A1. Structure of the window
The manager of JAG told you how to slide the panes. The instructions are N integers x1,x2,…,xN, and xi≤W holds for every i. If i is odd, slide the i-th pane east by xi. If i is even, slide it west by xi.
The panes never collide, even after you follow the instructions, because the N panes hang on two rails in alternation. A pane with odd i is attached to the inner rail of the building, and a pane with even i is attached to the outer rail.
Before carrying out the instructions, you want to know the area of the window that is open once they are done.