Area of an ASCII polygon You should write a program or function which receives a string representing an ascii-art polygon as input and outputs ot returns the area of the polygon.

The input is a string consisting of the characters _ / \ L V space and newline defining a simple polygon (which means no extra segments, no self-touch and no self-intersect).

The area of a single character cell is 2


_ splits the cell into sizes 0 and 2
\ splits the cell into sizes 1 and 1
/ splits the cell into sizes 1 and 1
L splits the cell into sizes 0 and 2
V splits the cell into sizes 1 and 1 (The two sides of the V will always be on the same side of the polygon so they are treated together in the listing.)


Every character connects the two corners of its character cell which you expect (e.g. top left and top right in case of V).

An example with area of 7 (1+2+1 in the second row and 1+1+1 in the third one):

 _
/ \
V\/


Input


Input will form a rectangle, i.e. there will be the same number of characters between newlines.
There can be extra whitespace on any side of the polygon.
Trailing newline is optional.


Output


A single positive integer, the area of the polygon.


Examples

Outputs are after the last row of their inputs.

  _  
  V  

1

/L
\/

3



    /VV\
    L  /
     L/
14

  ____/\ 
  \    /
/\/   /
\____/

32  

   /V\
  /   \__ 
  \     /
/\/   /V
L____/

45


This is code-golf so the shortest entry wins.
Pyth, 47 46 45 36 30
FNs.zx=Z}N&quot;\/L&quot;aY|}N&quot;\/V&quot;yZ;sY

Explanation:
FNs.z            For every character in input, except newlines...
  x=Z}N&quot;\/L&quot;     Swap state if /, \, or L.
  aY|}N&quot;\/V&quot;yZ;  Append 1 if /, \, or V, else 2 times the state to Y.
sY               Sum Y and print.

We have two states, &quot;in the polygon&quot;, and &quot;out of the polygon&quot;. The following characters each do the following when reading them from top-left to bottom-right:
/ \     swap state, add one to area
V                   add one to area
_ space             if in polygon, add two to area
L       swap state, if in polygon, add two to area

Note that &quot;add one to area&quot; and &quot;if in polygon, add two to area&quot; are mutually exclusive.