import java.io.BufferedReader; import java.io.IOException; import java.io.InputStreamReader; import static java.lang.System.in; public class Main { public static void main(String[] args) throws IOException { BufferedReader reader = new BufferedReader(new InputStreamReader(in)); int K = Integer.parseInt(reader.readLine()); int[] primes = new int[]{2, 3, 5, 7, 11, 13}; int[] composites = new int[]{4, 6, 8, 9, 10, 12}; double totalCombinations = 36; int counter = 0; for (int i = 0; i < 6; i++) { int x = primes[i]; for (int j = 0; j < 6; j++) { int y = composites[j]; if ((K%x) == 0 && y == K / x) { counter+=1; } } } System.out.println(counter/totalCombinations); } }