table = [] [2,3,5,7,11,13].each{|a| [4,6,8,9,10,12].each{|b| table.push(a * b) } } hash = Hash.new(0) table.each{|c| hash[c] += 1 } print 1.0 * Rational(hash[gets.to_i],36)