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: 12ms
Memory: 1756kB
Author: 2017212212174
In contest: 1277

#include <bits/stdc++.h>
using namespace std;

int main(){
	int t;
	while(cin>>t){
		int date=0;
		double num,sum=0;
		while(t--){
			cin>>num;
			if(num>0){
				sum+=(num/2);
			}
			else sum+=num;
			if(sum<0)date++;
		}
		cout<<date<<endl;
	}
}