#include <cstring>
#include <string>
#include <stdio.h>
#include <cmath>
#include <algorithm>
#include <iostream>
#include <stack>
#include <queue>
#include <limits.h>
#include <list>
#include <set>
#include <map>
#include <unordered_map>
using namespace std;
#define min(a,b) ((a)>(b)?(b):(a))
#define max(a,b) ((a)<(b)?(b):(a))
#define INF 0x3f3f3f3f
#define ll long long
#define sc scanf
#define pr printf
#define v1 first
#define v2 second
#define pii pair<int,int>
//#define f(nm1,nm2,nm3) for(int nm1=nm2; nm1<= nm3; nm1++)
#define lowbit(x) (x&(-x))
int n;
double minn=1e9;
double rec=-1;
struct node{
double x,y;
}p[100005],root;
double xie(node a,node b)
{
return (b.y-a.y)/(b.x-a.x);
}
node turn(node a,node b)
{
return {b.x-a.x,b.y-a.y};
}
double dis(node a)
{
return sqrt(a.x*a.x+a.y*a.y);
}
double calc(node a,node b)
{
return a.x*b.y+a.y*b.x;
}
bool cmp(node a,node b)
{
double k1=xie(root,a),k2=xie(root,b);
if(k1==k2)
{
return dis(turn(root,a))<dis(turn(root,b));
}
if(k1*k2<0)
{
return k1>k2;
}
if(k1*k2==0)
{
if(k1<0||k2<0)
{
return k1>k2;
}
else {
return k1<k2;
}
}
return k1<k2;
}
signed main()
{
sc("%d",&n);
for(int i=1; i <= n; i++)
{
sc("%lf%lf",&p[i].x,&p[i].y);
if(p[i].y<minn)
{
minn=p[i].y;
rec=p[i].x;
}
else if(p[i].y==minn)
{
rec=min(p[i].x,rec);
}
}
root={rec,minn};
sort(p+1,p+n+1,cmp);
stack<pair<node,int>> st;
p[0]=p[++n]=root;
// cout << root.x<<" "<< root.y<<"\n";
// for(int i=1; i <= n; i++)
// {
// pr("%d: %lf %lf\n",i,p[i].x,p[i].y);
// }
for(int i=1; i <= n; i++)
{
node now=turn(p[i-1],p[i]);
while(st.size()>0&&calc(st.top().v1,turn(p[st.top().v2],p[i]))<0)
{
// cout << p[i].x << " "<< p[i].y << endl;
st.pop();
}
st.push({turn(p[st.size()>0?st.top().v2:0],p[i]),i});
}
double ans=0;
while(!st.empty())
{
node now=st.top().v1;
// pr("2: %lf %lf\n",now.x,now.y);
st.pop();
ans+=dis(now);
}
pr("%.2lf",ans);
return 0;
}
/*
*/