<>;@L=glob<>;$K=<>; for(-30..30){ $t=2**-$_; $k=0; $k+=$_/($x+$t)|0for@L; $k>=$K and $x+=$t; } print$x