a[]={2,3,5,7,11,13},i,n;main(s){for(scanf("%d",&s);i<6;i++)s%a[i]|~5968>>s/a[i]&1|s/a[i]>15||n++;i=!printf("%.12lf",n/36.);}