#include <bits/stdc++.h>
#define ll long long
#define ld long double
#define len(x) (int)x.size()
#define all(x) x.begin(), x.end()

using namespace std;

//#define mtask

struct pnt{

    ld x, y;

    pnt(){

    }

    pnt(ld a, ld b){
        x = a;
        y = b;
    }

    pnt(ld a){
        x = cos(a);
        y = sin(a);
    }

    pnt operator-(const pnt &oth){
        return {x - oth.x, y - oth.y};
    }

    pnt operator+(const pnt &oth){
        return {x + oth.x, y + oth.y};
    }

    ld operator^(const pnt &oth){
        return x * oth.y - y * oth.x;
    }

};

void solve(){
    ld r;
    cin >> r;
    ld a, b, c, d, e, g;
    cin >> a >> b >> c >> d >> e >> g;

    auto get = [&](ld f, ld s, ld t){
        pnt u = pnt(f);
        pnt v(s);
        pnt q(t);
        u.x *= r;
        u.y *= r;

        v.x *= r;
        v.y *= r;

        q.x *= r;
        q.y *= r;
        return abs((u - v) ^ (q - v));
    };

    auto tern1 = [&](ld f, ld s) -> ld{
        ld le = e;
        ld ri = g;
        for(int _ = 0; _ < 100; ++_){
            ld mid1 = le + (ri - le) / 3;
            ld mid2 = ri - (ri - le) / 3;
            if(get(f, s, mid1) < get(f, s, mid2)){
                le = mid1;
            }
            else{
                ri = mid2;
            }
        }
        return get(f, s, le);
    };


    auto tern2 = [&](ld f)-> ld{
        ld le = c;
        ld ri = d;
        for(int _ = 0; _ < 100; ++_){
            ld mid1 = le + (ri - le) / 3;
            ld mid2 = ri - (ri - le) / 3;
            if(tern1(f, mid1) < tern1(f, mid2)){
                le = mid1;
            }
            else{
                ri = mid2;
            }
        }
        auto rs = tern1(f, le);
        return rs;
    };

    auto tern3 = [&]()-> ld{
        ld le = a;
        ld ri = b;
        for(int _ = 0; _ < 100; ++_){
            ld mid1 = le + (ri - le) / 3;
            ld mid2 = ri - (ri - le) / 3;
            if(tern2(mid1) < tern2(mid2)){
                le = mid1;
            }
            else{
                ri = mid2;
            }
        }
        auto rs = tern2(le);
        return rs;
    };

    cout << tern3() / 2 << '\n';

//    int n;
//    cin >> n;
//    vector<int> a(n);
//    for(int i = 0; i < n; ++i){
//        cin >> a[i];
//    }
//    set<array<int, 3>> st;
//    vector<int> d(n - 1);
//    int s = 0;
//    for(int i = 0; i < n - 1; ++i){
//        d[i] = a[i + 1] - a[i];
//    }
//    for(int i = 1; i < n - 1; ++i){
//
//    }

}

int main() {
    ios_base::sync_with_stdio(false);
    cout.precision(40);
#ifdef LOCAL
    freopen("in.txt", "r", stdin);
    freopen("out.txt", "w", stdout);
#endif
#ifdef mtask
    int t;
    cin >> t;
    while(t--)
#endif
    solve();
}