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