#include int main(void){double d=0;int c[]={4,6,8,9,10,12},p[]={2,3,5,7,11,13},i,j,a;scanf("%d",&a);for(i=0;i<6;i++)for(j=0;j<6;j++)if(a==c[i]*p[j])d++;printf("%.20lf\n",d/36);return 0;}