K = gets.to_i counter = 0 [2,3,5,7,11,13].each{ |i| [4,6,8,9,10,12].each{ |j| if i*j == K counter += 1 end } } ans = (counter.to_f / 36).round(12) puts ans