#include <vector>
#include <iostream>
#include <random>
#include <algorithm>

using namespace std;

int main()
{
    mt19937 g(random_device{}());
    vector<int> v;
    for(int i = 0; i < 28; ++i)
        if (i < 7) v.push_back(1);
        else v.push_back(0);
    int total = 0, ok = 0;
    for(int i = 0; i < 1000000; ++i)
    {
        shuffle(v.begin(),v.end(),g);
        if (v[0]+v[1]+v[2]+v[3] == 1) ++ok;
        ++total;
    }
    cout << double(ok)/total << endl;
}


