k = io.read("*n") a = {2,3,5,7,11,13} b = {4,6,8,9,10,12} t = {} for i = 1, 6 do for j = 1, 6 do c = a[i] * b[j] if(t[c] == nil) then t[c] = 1 / 36 else t[c] = t[c] + 1 / 36 end end end if(t[k] == nil) then print("0") else io.write(string.format("%.13f\n", t[k])) end