#include #include #include #include #include #include #include #include #include #include using namespace std; #define INIT cin.tie(0); ios::sync_with_stdio(false); #define FOR(i, a, n) for (int i = a; i < n; i++) #define REP(i, n) for(int i = 0; i < n; i++) int main() { INIT; int k; cin >> k; int A[6] = {2, 3, 5, 7, 11, 13}; int B[6] = {4, 6, 8, 9, 10, 12}; double cnt = 0; REP(i, 6){ REP(j, 6){ if(A[i] * B[j] == k) cnt++; } } double ans = cnt / 36; printf("%.12f", ans); return 0; }