#include main(){int a[6]={2,3,5,7,11,13},b[6]={4,6,8,9,10,12},c=0,k,i=5,j;std::cin>>k;for(;i--;){j=5;for(;j--;)if(a[i]*b[j]==k)c++;}printf("%.12f",c/36.0);return 0;}