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