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