num = gets.chomp.to_f prime_number = [2, 3, 5, 7, 11, 13] composite_number = [4, 6, 8, 9, 10, 12] product = Array.new for i in prime_number do for j in composite_number do product << i * j end end printf "%.17f", product.count(num).to_f / 36