var
n,i,ans,now,last:longint;
a:array[0..1000000]of longint;
begin
assign(input,'tower.in'); reset(input);
assign(output,'tower.out'); rewrite(output);
readln(n);
for i:=1 to n do readln(a[i]);
ans:=1;
last:=a[n];
now:=0;
for i:=n-1 downto 1 do
begin
inc(now,a[i]);
if now>=last then
begin
inc(ans);
last:=now;
now:=0;
end;
end;
writeln(ans);
close(input);
close(output);
end.