$totalBlockSize; $i++) { $totalBlockSize += $blocks[$i]; } $ans = $i - 1; } echo $ans."\n";