using System;
using System.Collections;
using System.Collections.Generic;
using System.Linq;
using System.Numerics;

namespace AtCoder_Beginner_Contest_145_C___Average_Length
{
    class Program
    {
        static void Main(string[] args)
        {
            List<Vector2> Coordinates = new List<Vector2>();

            int TownCount = int.Parse(Console.ReadLine());
            for (int i = 0; i < TownCount; i++)
            {
                IEnumerable<int> s = Console.ReadLine().Split(' ').Select(str => int.Parse(str));
                Coordinates.Add(new Vector2(s.ElementAt(0), s.ElementAt(1)));
            }

            Console.WriteLine(Coordinates.AllPermutation().Average(cs =>
            {
                double r = 0;
                for (int i = 0; i < cs.Count() - 1; i++)
                    r = r + Math.Sqrt(
                        Math.Pow(cs.ElementAt(i).X - cs.ElementAt(i + 1).X, 2) +
                        Math.Pow(cs.ElementAt(i).Y - cs.ElementAt(i + 1).Y, 2));
                return r;
            }));
        }
    }


    static class AllPermutationEnumerable
    {
        public static IEnumerable<IEnumerable<TSource>> AllPermutation<TSource>(this IEnumerable<TSource> sources) => new AllPermutationEnumerableIterator<TSource>(sources);
        public static IEnumerable<IEnumerable<TSource>> AllPermutation<TSource>(this TSource[] sources) => new AllPermutationArrayIterator<TSource>(sources);

        private static bool NextPermutation(int[] vs)
        {
            int i = MaxI(vs);
            if (i == -1) return false;

            int j = MaxJ(vs, vs[i]);

            int iValue = vs[i];
            vs[i] = vs[j];
            vs[j] = iValue;
            Array.Reverse(vs, i + 1, vs.Length - (i + 1));
            return true;
        }
        private static int MaxI(int[] vs)
        {
            for (int i = vs.Length - 2; 0 <= i; i--)
                if (vs[i] < vs[i + 1])
                    return i;
            return -1;
        }
        private static int MaxJ(int[] vs, int iValue)
        {
            for (int j = vs.Length - 1; ; j--)
                if (iValue < vs[j])
                    return j;
            throw new NotImplementedException();
        }



        private class AllPermutationEnumerableIterator<TSource> : IEnumerable<IEnumerable<TSource>>
        {
            private readonly IEnumerable<TSource> _source;

            public AllPermutationEnumerableIterator(IEnumerable<TSource> ts)
            {
                _source = ts;
            }

            public IEnumerator<IEnumerable<TSource>> GetEnumerator()
            {
                int Length = _source.Count();
                int[] array = Enumerable.Range(0, Length).ToArray();
                do
                {
                    int[] vs = new int[Length];
                    array.CopyTo(vs, 0);
                    yield return new PermutationEnumerable(_source, vs);
                }
                while (NextPermutation(array));
            }

            IEnumerator IEnumerable.GetEnumerator() => GetEnumerator();

            class PermutationEnumerable : IEnumerable<TSource>
            {
                private readonly IEnumerable<TSource> _source;
                private readonly int[] _permutation;

                public PermutationEnumerable(IEnumerable<TSource> source, int[] permutation)
                {
                    _source = source;
                    _permutation = permutation;
                }

                public IEnumerator<TSource> GetEnumerator()
                {
                    foreach (var i in _permutation)
                        yield return _source.ElementAt(i);
                }

                IEnumerator IEnumerable.GetEnumerator() => GetEnumerator();
            }
        }
        private class AllPermutationArrayIterator<TSource> : IEnumerable<IEnumerable<TSource>>
        {
            private readonly TSource[] _source;

            public AllPermutationArrayIterator(TSource[] source)
            {
                _source = source;
            }

            public IEnumerator<IEnumerable<TSource>> GetEnumerator()
            {

                int Length = _source.Length;
                int[] array = Enumerable.Range(0, Length).ToArray();
                do
                {
                    int[] vs = new int[Length];
                    array.CopyTo(vs, 0);
                    yield return new PermutationEnumerable(_source, vs);
                }
                while (NextPermutation(array));
            }

            IEnumerator IEnumerable.GetEnumerator() => GetEnumerator();

            class PermutationEnumerable : IEnumerable<TSource>
            {

                private readonly TSource[] _source;
                private readonly int[] _permutation;

                public PermutationEnumerable(TSource[] source, int[] permutation)
                {
                    _source = source;
                    _permutation = permutation;
                }

                public IEnumerator<TSource> GetEnumerator()
                {
                    foreach (var i in _permutation)
                        yield return _source[i];
                }

                IEnumerator IEnumerable.GetEnumerator() => GetEnumerator();
            }
        }
    }
}


Measured memory_bytes: 47120