#include<iostream>
#include<cmath>
using namespace std;
struct place{
float x,y;
} pot[5];
float squ(float x){
return pow(x,2);
}
float dis(float a,float b,float c,float d){
return sqrt(squ(a-b)+squ(c-d));
}
int main(){
float ans=0;
for(int i=1;i<=3;i++) cin>>pot[i].x>>pot[i].y;
ans+=dis(pot[2].x,pot[1].x,pot[2].y,pot[1].y);
ans+=dis(pot[3].x,pot[2].x,pot[3].y,pot[2].y);
ans+=dis(pot[3].x,pot[1].x,pot[3].y,pot[1].y);
cout<<ans;
return 0;
}