Fence

No attempts yetTime limit1sMemory limit128 MB

Problem

A flat field has a region enclosed by a fence of height hh. Viewed from above (in plan projection), the fence forms a simple closed polygonal line (with no self-intersections), given by the Cartesian coordinates (Xi,Yi)(X_i, Y_i) of its NN vertices, listed in order around the boundary.

A point lamp stands on the field at coordinates (0,0)(0, 0). The lamp may lie either inside or outside the fenced region, but it never lies exactly on a side of the fence.

The fence is perfectly black: it neither reflects, diffuses, nor transmits light, so it also casts shadows. A board of the fence is lit only if the straight ray from the lamp reaches it without being blocked by another part of the fence.

The intensity of light reaching an illuminated point of the fence is

I0=krI_0 = \frac{k}{r}

where kk is a known constant (the same for every point) and rr is the plan-projection distance from that point to the lamp.

Consider an infinitesimally narrow vertical board of width dldl and height hh. Its illumination is

dI=I0cosαdlhdI = I_0 \cdot \left|\cos\alpha\right| \cdot dl \cdot h

where I0I_0 is the light intensity on that board and α\alpha is the angle (in plan projection) between the normal to the fence side at that point and the direction to the lamp.

Write a program that computes the total illumination of the fence, defined as the sum of the illuminations of all its lit boards.

Input

The first line contains kk, hh, and NN, separated by spaces. kk and hh are real constants, and NN (3N1003 \le N \le 100) is the number of fence vertices. Each of the next NN lines contains two real numbers XiX_i and YiY_i separated by a space -- the coordinates of one vertex, given in order around the fence.

Output

Print the total illumination of the fence, rounded to two digits after the decimal point.