#include <bits/stdc++.h>
using namespace std;
int main(){
double x1,x2,y1,y2,z1,z2;
cin >>x1>>x2>>y1>>y2>>z1>>z2;
cout <<fixed << setprecision(2)<<sqrt((x1-x2)*(x1-x2)+(y1-y2)*(y1-y2))+sqrt((x1-x2)*(x1-x2)+(z1-z2)*(z1-z2))+sqrt((z1-z2)*(z1-z2)+(y1-y2)*(y1-y2));
return 0;
}