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: 2018212212236
In contest: 1277

#include<stdio.h>
int main() {
	int a, b, c, d, e;
	int t;
	while(scanf("%d", &t) != EOF) {
		int all = 0, luncky = 0;
		int x;
		while(t--) {
			scanf("%d", &x);
			if(x > 0) {
					x = x / 2;
			}
			luncky += x;
			if(luncky < 0)
				all += 1;
			else 
				all += 0;
		}
		printf("%d\n", all);

	}


	return 0;

}