P1513 The Long Rope Around the Nails

Description

There are $N$ cylindrical nails on the plane, each with radius $R$. The centers of all nails form a convex polygon. Now you need to use a rope to enclose these nails. The rope’s diameter is negligible. Find the length of the rope.

Input Format

The first line contains two numbers: an integer $N$ ($1 \le N \le 100$) and a real number $R$. The next $N$ lines give the coordinates of the $N$ nail centers in counterclockwise order. The absolute value of each coordinate does not exceed $100$.

Output Format

Output one number: the length of the rope, to $2$ decimal places.

Explanation/Hint

This problem is from URAL 1020, translation from NOCOW. Translated by ChatGPT 5