#include <iostream>
#include <iomanip>

using namespace std;

int main() {
	static const int primes[] = { 2, 3, 5, 7, 11, 13 };
	static const int composites[] = { 4, 6, 8, 9, 10, 12 };
	int k;
	cin >> k;
	int count = 0;
	for (int i = 0; i < 6; ++i) {
		for (int j = 0; j < 6; ++j) {
			if (primes[i] * composites[j] == k) {
				++count;
			}
		}
	}
	double result = (double)count / 36.0;
	cout << setprecision(13) << result << endl;
	return 0;
}