N,K=$<.map &:to_i s=0.0 (t=9**6).times{a=0 N.times{|i|a+=rand(1..6)-rand(4-i/K*3..6)} s+=1 if a<0} p s/t