#include <iostream>
#include <cstdlib>
using namespace std;

int main()
{
	int K;
	cin >> K;

	int tmp = 0, a = 0, b = 0;
	while (b <= 1000000)
	{
		tmp += rand() % 6 + 1;
		++a;
		if (K <= tmp)
		{
			++b;
			tmp = 0;
		}
	}

	cout << (double)a / (double)b << endl;

	return 0;
}