// #define _GLIBCXX_DEBUG #include using namespace std; #define rep(i, n) for (int i = 0; i < (int)(n); ++i) int main() { // Input int K; cin >> K; // Calculate int ans = 0; int p[6] = {2, 3, 5, 7, 11, 13}; int c[6] = {4, 6, 8, 9, 10, 12}; rep(i, 6) rep(j, 6) if (p[i] * c[j] == K) ++ans; // Output cout << fixed << setprecision(20); cout << ans / 36.0 << endl; }