#include <cmath>#include <iomanip>#include <iostream>#include <algorithm>usingnamespacestd;#define x first#define y secondtypedefpair<int,int>Point;constdoublePI=acos(-1.0);inlineintsqr(constintx){returnx*x;}inlinebooloperator<(constPoint&lhs,constPoint&rhs){returnlhs.x<rhs.x||(lhs.x==rhs.xx&&lhs.y<rhs.y);}inlineintCrossProduct(constPoint&A,constPoint&B,constPoint&C,constPoint&D){constintx1=B.x-A.x,y1=B.y-A.y;constintx2=D.x-C.x,y2=D.y-C.y;returnx1*y2-y1*x2;}classConvexHull{inttop;Pointstack[1000];public:ConvexHull():top(-1){}voidAdd(constPoint&);doublePerimeter()const;voidInit(constPoint&first,constPoint&second){stack[++top]=first,stack[++top]=second;}};inlinevoidConvexHull::Add(constPoint&x){while(top>0&&CrossProduct(stack[top],x,stack[top],stack[top-1])>=0)--top;stack[++top]=x;}inlinedoubleConvexHull::Perimeter()const{doublec=.0;for(inti=0;i<top;++i)c+=sqrt(sqr(stack[i+1].x-stack[i].x)+sqr(stack[i+1].y-stack[i].y));returnc;}intn,r;Pointa[1000];ConvexHullHull;intmain(){ios::sync_with_stdio(false);cin>>n>>r;for(inti=0;i<n;++i)cin>>a[i].x>>a[i].y;sort(a,a+n);Hull.Init(a[0],a[1]);for(inti=2;i<n;++i)Hull.Add(a[i]);for(inti=n-1;i>=0;--i)Hull.Add(a[i]);cout<<fixed<<setprecision(0)<<Hull.Perimeter()+2*r*PI;}