#include using namespace std; #define rep(i, n) for (int i = 0; i < (n); i++) typedef long long ll; typedef pair pii; typedef vector vll; typedef vector vi; typedef vector> vvi; typedef vector> vvll; const ll inf = 1e16; const ll md = 1000000007; int main() { int k; cin>>k; vi a={2,3,5,7,11,13}; vi b={4,6,8,9,10,12}; double cnt=0; rep(i,6) rep(j,6) if(a[i]*b[j]==k) cnt++; printf("%.13f",cnt/36); return 0; }