import java.util.Scanner; public class Main_yukicoder211 { public static void main(String[] args) { Scanner sc = new Scanner(System.in); int k = sc.nextInt(); int[] d1 = {2, 3, 5, 7, 11, 13}; int[] d2 = {4, 6, 8, 9, 10, 12}; int ret = 0; for (int i = 0; i < 6; i++) { for (int j = 0; j < 6; j++) { if ((d1[i] * d2[j]) == k) { ret++; } } } System.out.println((double)ret / 36); sc.close(); } }