z = [2,3,5,7,11,13].map{|p| [4,6,8,9,10,12].map{|q| [p,q]}}.flatten(1) V = gets.to_i puts z.filter{|x| x[0] * x[1] == V}.size * 1.0 / z.size