var
a,b,c,d,e,n:longint;
qq,dp,gs,sum:array[0..100001] of longint;
function min(xx,yy:longint):longint;
begin
if xx>yy then exit(yy)
else exit(xx);
end;
begin
assign(input,'tower.in');
reset(input);
assign(output,'tower.out');
rewrite(output);
readln(n);
for a:=1 to n do
begin
read(qq[a]);
sum[a]:=sum[a-1]+qq[a];
dp[a]:=maxlongint div 3;
end;
for a:=n downto 1 do
begin
for b:=a to n do
if (sum[b]-sum[a-1]>=dp[b+1]) and (dp[a]>sum[b]-sum[a-1])
then begin
dp[a]:=sum[b]-sum[a-1];
gs[a]:=gs[b+1]+1;
break;
end;
end;
writeln(gs[1]);
close(input);
close(output);
end.