type zap=record x,y:longint; end;
var a,b:array[1..1000] of zap;
p,j,i,n,m,k:longint;
pr:real;
function kosp(a1,a2,b1,b2:zap):longint;
begin
kosp:=(a2.x-a1.x)*(b2.y-b1.y)-(a2.y-a1.y)*(b2.x-b1.x)
end;

function d(a1,a2:zap):longint;
begin
d:=sqr(a1.x-a2.x)+sqr(a1.y-a2.y);
end;

begin

assign(input, 'input.txt'); reset(input);
  assign(output, 'output.txt'); rewrite(output);

readln(n);

for j:=1 to n do
readln(a[j].x,a[j].y);

m:=1;

for i:=2 to n do
if (a[i].y<a[m].y)or( (a[i].y=a[m].y) and (a[i].x>a[m].x) ) then m:=i;

b[1]:=a[m];
a[m]:=a[1];
a[1]:=b[1];

k:=1;
p:=2;

repeat

for j:=2 to n do
if (kosp(b[k],a[p],b[k],a[j])<0)or( (kosp(b[k],a[p],b[k],a[j])=0)and(d(b[k],a[p])<d(b[k],a[j])) ) then p:=j;

k:=k+1;
b[k]:=a[p];
p:=1;
until (b[k].x=b[1].x)and (b[k].y=b[1].y);
pr:=0;
for j:=1 to k-1 do pr:=pr+sqrt(d(b[j],b[j+1]));
writeln(pr:0:1);
end.