Start: Jul, 05, 2019 08:40:00
2019年度暑期短学期达标测试
End: Jul, 05, 2019 11:40:00
Time elapsed:
Time remaining:

Problem_ID: C
Result: Accepted
Time: 6ms
Memory: 1756kB
Author: CT12810381281
In contest: 1281

#include<iostream>
#include<string>
#include<iomanip>
#include<cmath>
#include<deque>
#include<map>
#include<algorithm>
using namespace std;
deque<int> m;
map<string, int> x;
deque<pair<string, int>> r;
int main() {
	int t;
	while(cin >> t) {
		int lunck = 0, num = 0;
		while(t--) {
			int n;
			cin >> n;
			if(n > 0)
				n /= 2;
			lunck += n;
			if(lunck < 0)
				num++;
		}
		cout << num;
		if(t != 0)
			cout << endl;
	}
	return 0;
}