#include #define rep(i,n) for(int i = 0; i < (n); i++) using namespace std; typedef long long ll; int main(){ cin.tie(0); ios::sync_with_stdio(0); int k; cin >> k; int a[] = {2,3,5,7,11,13}; int b[] = {4,6,8,9,10,12}; int c = 0; rep(i,6)rep(j,6) c += (a[i] * b[j] == k); cout.precision(17); cout << (double)c / 36 << endl; }