#include<stdio.h>
#include<cmath>

int main(){
double x1,x2,y1,y2,r,R;
scanf("%lf %lf %lf %lf",&x1,&y1,&x2,&y2);
r=(x1-x2)*(x1-x2)+(y1-y2)*(y1-y2);
R=sqrt(r);
printf("%lf\n",R);
return 0;
}
#include <iostream>
#include <map>
#include <algorithm>
#include <vector>
#include <iomanip>
#include <sstream>
#include <cmath>
#include <math.h>
#include <string>
using namespace std;
typedef long long ll;

int main() {
    ios::sync_with_stdio(false);
    cin.tie(0);
    int n;
    cin >> n;
    int a[n] , b[n] , c[n];
    for( int i = 0 ; i < n ; i++ ) cin >> a[i];
    for( int i = 0 ; i < n ; i++ ) cin >> b[i];
    for( int i = 0 ; i < n ; i++ ) cin >> c[i];
    sort( a , a + n );
    sort( b , b + n );
    sort( c , c + n );
    ll x = 0 , d = 0 , e = 0;
    for( int i = 0 ; i < n ; i++ ) {
        d = 1ll * ( lower_bound( a , a + n , b[i] ) - a );
        e = 1ll * ( n - (upper_bound( c , c + n , b[i] ) - c ) );
        x += d * e;
    }
    cout << x;
}

