/*************************************************
Author :supermaker
Created Time :2016/1/26 12:27:46
File Location :C:\Users\abcd\Desktop\TheEternalPoet
**************************************************/
#pragma comment(linker, "/STACK:102400000,102400000")
#include <set>
#include <bitset>
#include <list>
#include <map>
#include <stack>
#include <queue>
#include <deque>
#include <string>
#include <vector>
#include <ios>
#include <iostream>
#include <fstream>
#include <sstream>
#include <iomanip>
#include <algorithm>
#include <utility>
#include <complex>
#include <numeric>
#include <functional>
#include <cmath>
#include <ctime>
#include <climits>
#include <cstdarg>
#include <cstdio>
#include <cstdlib>
#include <cstring>
#include <cctype>
#include <cassert>
using namespace std;
#define CFF freopen ("aaa.txt", "r", stdin)
#define CPPFF ifstream cin ("aaa.txt")
#define DB(ccc) cout << #ccc << " = " << ccc << endl
#define PB push_back
#define MP(A, B) make_pair(A, B)
typedef long long LL;
typedef unsigned long long ULL;
typedef double DB;
typedef pair <int, int> PII;
typedef pair <int, bool> PIB;
const int INF = 0x7F7F7F7F;
const int MOD = 1e9 + 7;
const double EPS = 1e-10;
const double PI = 2 * acos (0.0);
const int maxn = 166 + 66;
int sgn (double val)
{
if (fabs (val) < EPS) return 0;
else if (val < 0) return -1;
return 1;
}
struct Point
{
double x, y;
Point () {}
Point (double xx, double yy) : x (xx), y (yy) {}
Point operator + (const Point &a) const
{
return Point (x + a.x, y + a.y);
}
Point operator - (const Point &a) const
{
return Point (x - a.x, y - a.y);
}
double operator ^ (const Point &a) const
{
return x * a.y - y * a.x;
}
double operator * (const Point &a) const
{
return x * a.x + y * a.y;
}
};
double dist (Point p1, Point p2)
{
return sqrt ((p2 - p1) * (p2 - p1));
}
double CrossMul (Point p0, Point p1, Point p2)
{
return (p1 - p0) ^ (p2 - p0);
}
double DotMul (Point p0, Point p1, Point p2)
{
return (p1 - p0) * (p2 - p0);
}
Point point[maxn];
int n, start_pos;
bool vis[maxn];
int SS (int u)
{
int pos = -1;
for (int i = 1; i <= n; i++)
if (i != u && !vis[i])
{
if (pos == -1) pos = i;
else
{
double tt1 = CrossMul (point[u], point[i], point[pos]);
if (sgn (tt1) == 1) pos = i;
else if (sgn (tt1) == 0)
{
double tt2 = DotMul (point[pos], point[u], point[i]);
if (sgn (tt2) == -1) pos = i;
}
}
}
vis[pos] = true;
return pos;
}
double Jarvis ()
{
if (n == 1) return 0;
else if (n == 2) return dist (point[1], point[2]);
else
{
double res = 0;
memset (vis, false, sizeof (vis));
int now = start_pos, next;
while (1)
{
next = SS (now);
res += dist (point[now], point[next]);
now = next;
if (now == start_pos) break;
}
return res;
}
}
int main()
{
//CFF;
//CPPFF;
while (scanf ("%d", &n) != EOF)
{
if (n == 0) break;
start_pos = -1;
Point start = Point (INF, INF);
for (int i = 1; i <= n; i++)
{
double x, y;
scanf ("%lf%lf", &x, &y);
point[i] = Point (x, y);
if (sgn (point[i].x - start.x) == -1)
start = point[i], start_pos = i;
else if (sgn (point[i].x - start.x) == 0 && sgn (point[i].y - start.y) == -1)
start = point[i], start_pos = i;
}
printf ("%.2lf\n", Jarvis ());
}
return 0;
}