#jag2017autumna. [jag2017autumn_a]Window

[jag2017autumn_a]Window

MathJax.Hub.Config({ tex2jax: { inlineMath: [["","",""], ["\\(","\\)"]], processEscapes: true }}); blockquote { font-family: Menlo, Monaco, "Courier New", monospace; color: #333333; display: block; padding: 8.5px; margin: 0 0 9px; font-size: 16px; line-height: 18px; background-color: #f5f5f5; border: 1px solid rgba(0, 0, 0, 0.15); -webkit-border-radius: 4px; -moz-border-radius: 4px; border-radius: 4px; white-space: pre; white-space: pre-wrap; word-break: break-all; word-wrap: break-word; }

Problem Statement

In the building of Jewelry Art Gallery (JAG), there is a long corridor in the east-west direction. There is a window on the north side of the corridor, and NN windowpanes are attached to this window. The width of each windowpane is WW, and the height is HH. The ii-th windowpane from the west covers the horizontal range between Wtimes(i1)W \\times (i - 1) and WtimesiW \\times i from the west edge of the window.

You received instructions from the manager of JAG about how to slide the windowpanes. These instructions consist of NN integers x_1,x_2,dots,x_Nx\_1, x\_2, \\dots, x\_N, and x_ileWx\_i \\le W is satisfied for all ii. For the ii-th windowpane, if ii is odd, you have to slide ii-th windowpane to the east by x_ix\_i, otherwise, you have to slide ii-th windowpane to the west by x_ix\_i.

You can assume that the windowpanes will not collide each other even if you slide windowpanes according to the instructions. In more detail, NN windowpanes are alternately mounted on two rails. That is, the ii-th windowpane is attached to the inner rail of the building if ii is odd, otherwise, it is attached to the outer rail of the building.

Before you execute the instructions, you decide to obtain the area where the window is open after the instructions.


Input

The input consists of a single test case in the format below.

NN HH WW x_1x\_1 cdots\\cdots x_Nx\_N

The first line consists of three integers NN, HH, and WW (1leNle1001 \\le N \\le 100, 1leH,Wle1001 \\le H, W \\le 100). It is guaranteed that NN is even. The following line consists of NN integers x_1x\_1, ldots\\ldots, x_Nx\_N while represent the instructions from the manager of JAG. x_ix\_i represents the distance to slide the ii-th windowpane (0lex_ileW0 \\le x\_i \\le W).

Output

Print the area where the window is open after the instructions in one line.


Sample Input 1

4 3 3
1 1 2 3

Output for Sample Input 1

9

Sample Input 2

8 10 18
2 12 16 14 18 4 17 16

Output for Sample Input 2

370

Sample Input 3

6 2 2
0 2 2 2 2 0

Output for Sample Input 3

8

Sample Input 4

4 1 4
3 3 2 2

Output for Sample Input 4

6

Sample Input 5

8 7 15
5 0 9 14 0 4 4 15

Output for Sample Input 5

189