#include using namespace std; typedef long long ll; int main(){ int k; cin >> k; int ans = 0; int c[6] = {2,3,5,7,11,13}; int p[6] = {4,6,8,9,10,12}; for (auto x : c) for (auto y : p) if (x * y == k) ans++; printf("%.10f\n" ,(ans / 36.0)); return 0; }