($k * 2)){ $nokori = $nokori - ($k * 2); $count++; } echo $count * $k;