K = gets.to_i prime = [2, 3, 5, 7, 11, 13] synthesis = [4, 6, 8, 9, 10, 12] count = 0 prime.each do |i| synthesis.each do |j| count += 1 if K == i * j end end puts count.to_f / (prime.length * synthesis.length)