#include<bits/stdc++.h>
using namespace std;
#define int long long
#define REP(i,a,b) for(int i=(int)(a);i<(int)(b);i++)
#define rep(i,n) REP((i),0,(n))
#define RREP(i,a,b) for(int i=(int)(a);i>=(int)(b);i--)
#define rrep(i,n) RREP(i,n,0)
#define each(it,X) for(__typeof((X).begin())  it=(X).begin();it!=(X).end();it++)
#define all(v) ((v).begin(),(v).end())
#define fi first
#define se second
#define pb push_back
typedef pair<int,int>pr;
typedef vector<int>vi;
typedef vector<vi>vvi;
const int INF=1070000000ll;
const int mod=1000000007ll;

signed main(){
    cin.tie(0);
    ios_base::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 cnt=0;
    rep(i,6)rep(j,6){
        if(a[i]*b[j]==K)cnt++;
    }

    cout<<1.0*cnt/36<<endl;

    return 0;
}