eolymp
bolt
Try our new interface for solving problems

Rope

Plotters have barbarously hammered \textbf{N} nails into an innocent plane shape, so that one can see now only heads. Moreover, pursuing their mean object, they have hammered all the nails into the vertices of a convex polygon. After that they…it is awful… have roped off the nails, so that the shape felt upset (the rope was very thin). They’ve done it as it is shown in the figure. \includegraphics{http://acm.timus.ru/image/get.aspx/5efad458-3218-423f-b3f6-685fc554139f} Your task is to find out a length of the rope. \InputFile There two numbers in the first line of the standard input: \textbf{N} --- a number of nails (\textbf{1} ≤ \textbf{N} ≤ \textbf{100}), and a real number \textbf{R} --- a radius of heads of nails. All the heads have the same radius. Further there are \textbf{N} lines, each of them contains a pair of real coordinates (separated by a space) of centers of nails. An absolute value of the coordinates doesn’t exceed \textbf{100}. The nails are described either in a clockwise or in a counterclockwise order starting from an arbitrary nail. Heads of different nails don’t adjoin. \OutputFile Output a real number with two digits precision (after a decimal point) --- a length of the rope.
Time limit 1 second
Memory limit 64 MiB
Input example #1
4 1
0.0 0.0
2.0 0.0
2.0 2.0
0.0 2.0
Output example #1
14.28
Author Alexander Petrov & Nikita Shamgu