#!/usr/bin/env python3
import math
import sys
n = int(input())

total_distance = 0.0
prevX = 0
prevY = 0
for i in range(n):
    x,y,t = list(map(float, input().split()))
    total_distance += math.sqrt(math.pow(prevX-x,2)+math.pow(prevY-y,2))
    prevX = x
    prevY = y

assert total_distance >= 100


# Nothing to report
sys.exit(42)
