#include using namespace std; int p[] = {2, 3, 5, 7, 11, 13}; int c[] = {4, 6, 8, 9, 10, 12}; int main() { int K; cin >> K; double ans = 0; for(int i = 0; i < 6; i++) { for(int j = 0; j < 6; j++) { if(K == p[i] * c[j]) ans++; } } ans /= 36; cout << fixed << setprecision(15) << ans << endl; return 0; }