import java.util.*; //import java.text.*; public class Exercise77{ public static void main (String[] args){ //DecimalFormat df = new DecimalFormat("#.############"); Scanner sc = new Scanner(System.in); double n = sc.nextDouble(); double[] pDice = new double[]{2, 3, 5, 7, 11, 13}; double[] cDice = new double[]{4, 6, 8, 9, 10, 12}; double count = 0; for (int i = 0; i < pDice.length; i++){ if (n % pDice[i] != 0){ continue; } double devided = n / pDice[i]; for (int j = 0; j < cDice.length; j++){ if (devided == cDice[j]){ count++; }else{ } } } System.out.println(count / (double)(pDice.length * cDice.length)); } }