시간 제한메모리 제한제출정답맞힌 사람정답 비율
1 초 512 MB100221214.634%

문제

Smurfs love to play computer game called SmurfCraft.  In this game there are a number of power sources to be harvested. Lazy Smurf must build his new base.  He already found the location of three unoccupied power sources, and now wants to build his base in a position that minimizes the total distance to all three of those power sources.  This problem wouldn't be difficult (even for Lazy Smurf) if not for the fact that the game is played in 3D.  Because Lazy Smurf skipped his geometry classes he doesn't know how to solve this problem.  Help him.

입력

There are three input lines, each contains three integers $x, y, z$ ($-10^9 \leq x, y, z \leq 10^9$) -- the coordinates of a power source.

출력

Output the minimum possible total distance to all three of the power sources. Your answer will be accepted if relative or absolute error is less than $10^{-4}$.

예제 입력 1

0 0 0
20 0 0
10 20 0

예제 출력 1

37.320508