using System; using System.Collections.Generic; using System.Linq; using System.Text; using System.Threading.Tasks; namespace foryuki { class Program { static void Main(string[] args) { int K = int.Parse(Console.ReadLine()); int[] s = new int[] { 2, 3, 5, 7, 11, 13 }; int[] g = new int[] { 4, 6, 8, 9, 10, 12 }; int[] seki = new int[36]; int index = 0; for (int i = 0; i < s.Length; i++) { for (int j = 0; j < g.Length; j++) { seki[index] = s[i] * g[j]; index++; } } double ans = 0; var a = seki.Where(x => x == K).Select(x => seki); foreach (var item in a) { ans = a.Count(); } Console.WriteLine(string.Format("{0:f16}", ans/36)); } //------------------------------------------------------------- private int[] ConvertStringArrayToIntArray(string[] str, int defaultValue) { int[] b = Array.ConvertAll(str, delegate(string value) { return int.Parse(value); }); for (int i = 0; i < b.Length; i++) { b[i] = defaultValue; } return b; } } }