#include<iostream>
#include<cmath>
#include<iomanip>
using namespace std;
double howfar(int x1, int x2, int y1, int y2){
return sqrt(pow(x2 - x1, 2) + pow(y2 - y1, 2));
}
int main(){
int a, b;
cin >> a >> b;
int c, d;
cin >> c >> d;
int e, f;
cin >> e >> f;
cout << fixed << setprecision(3)<< howfar(a, c, b, d) + howfar(a, e, b, f) + howfar(c, e, d, f);
return 0;
}