#include<bits/stdc++.h> using namespace std; int main(){ cin.tie(0),ios::sync_with_stdio(false); vector<int>p={2,3,5,7,11,13},m={4,6,8,9,10,12}; int k; cin>>k; int n=0; for(int i=0;i<6;++i){ for(int j=0;j<6;++j){ if(p.at(i)*m.at(j)==k)++n; } } cout<<fixed<<setprecision(20)<<(long double)n/36<<"\n"s; }