i = gets.to_i
i2 -= 2
lines = readlines(chomp: true).map{|line| line.split(' ').map{|num| num.to_i}}

result = 0

sum = 0
for n in 0..i2
  x = ( lines[n][0] - lines[n+1][0] ) ** 2
  y = ( lines[n][1] - lines[n+1][1] ) ** 2
  sum += Math.sqrt(x + y)
end
result += sum
