#include <iostream> #include <cstdio> #include <cstring> #include <algorithm> #include <queue> #include <map> #include <vector> #include <set> #include <string> #include <cmath> using namespace std; const int maxn=1e5+10; const double PI=acos(-1.0); struct Point { double x,y; Point(double x=0,double y=0):x(x),y(y) {}; }; typedef Point Vector; Vector operator - (Point A, Point B){ return Vector(A.x-B.x, A.y-B.y); } // 向量生成 double dis(Point A,Point B) { return sqrt( (A.x-B.x)*(A.x-B.x)+(A.y-B.y)*(A.y-B.y) ); } double Cross(Vector B, Vector A) { return A.x*B.y-A.y*B.x; } // 叉积 Point pa[maxn]; Point pt[maxn]; bool up(Point a,Point b) { if(a.x!=b.x) return a.x<b.x; return a.y<b.y; } int main() { int n,r; scanf("%d %d",&n,&r); for(int i=0;i<n;i++) scanf("%lf %lf",&pa[i].x,&pa[i].y); sort(pa,pa+n,up); int m=0; for(int i=0;i<n;i++) { while(m>1 && Cross(pt[m-1]-pt[m-2],pa[i]-pt[m-2])<=0) m--; pt[m++]=pa[i]; } int k=m; for(int i=n-2;i>=0;i--) { while(m>k && Cross(pt[m-1]-pt[m-2],pa[i]-pt[m-2])<=0) m--; pt[m++]=pa[i]; } if(n>1) m--; double ans=0; for(int i=1;i<m;i++) ans+=dis(pt[i],pt[i+1]); ans+=dis(pt[m],pt[1]); //cout<<ans<<" "<<PI<<endl; ans+=PI*r*2; printf("%.0f\n",ans); return 0; }