($N,$K)=<>; map{ $a=0; $a+=0|4+rand 3for 1..$K; $a+=0|1+rand 6for$K+1..$N; $a-=0|1+rand 6for 1..$N; $%+=$a>0; }1..7e5; print$%/7e5