import java.util.Scanner; import java.util.stream.IntStream; public class Main{ static Scanner s=new Scanner(System.in); static int getInt(){return Integer.parseInt(s.next());} static IntStream REPS(int v){return IntStream.range(0,v);} static IntStream REPS(int l,int r){return IntStream.rangeClosed(l,r);} static IntStream INS(int n) {return REPS(n).map(i->getInt());} static class Pair{ T l;U r; Pair(T L,U R){l=L;r=R;} T getL(){return l;} U getR(){return r;} } public static void main(String[]$){ int k=getInt(); double r[]=new double[13*12+1]; int[]p={2,3,5,7,11,13},c={4,6,8,9,10,12}; for(int i=0;i<6;++i) for(int j=0;j<6;++j) r[p[i]*c[j]]+=1.0/36; System.out.println(r[k]); } }