import java.io.*; public class No211{ public static void main(String[] args) throws IOException{ String str = new BufferedReader(new InputStreamReader(System.in)).readLine(); int k = Integer.parseInt(str); int[] pnd = {2,3,5,7,11,13}; int[] cnd = {4,6,8,9,10,12}; int count = 0; for(int i=0; i < 6; i++){ for(int j=0; j < 6; j++){ if(pnd[i] * cnd[j] == k){ count++; break; } } } if(count == 0) System.out.println(0); else System.out.println((double)count/36); } }