Start: Jul, 01, 2019 08:30:00
2019年度暑期短学期第四天
End: Jul, 01, 2019 11:30:00
Time elapsed:
Time remaining:

Problem_ID: D
Result: Accepted
Time: 5ms
Memory: 1120kB
Author: waterTO
In contest: 1277

#include<stdio.h>
int main()
{
	int n;
	while(scanf("%d",&n)!=EOF){
		float  sum=0;
		int ans=0;
	while(n--){
		float t;
		scanf("%f",&t);
		if(t>0)
			t=t/2;
		sum+=t;
		if(sum<0)
			ans+=1;
	}
	printf("%d\n",ans);
	}return 0;
}