#include #define PB push_back #define MP make_pair #define REP(i,n) for (int i=0;i<(n);i++) #define FOR(i,a,b) for(int i=(a);i<(b);i++) #define ALL(a) (a).begin(),(a).end() using namespace std; typedef long long ll; typedef unsigned long long ull; typedef pair P; const int INF=1e9; const int MOD=100000; int B=1000000; int main(){ int a[6]={2,3,5,7,11,13}; int b[6]={4,6,8,9,10,12}; int k,cnt=0; cin>>k; REP(i,6)REP(j,6)if(a[i]*b[j]==k)cnt++; printf("%.10f\n",(double)cnt/36.0); }