function Main(input) {
	input = input.trim().split("\n").map(function(x) { return x.split(" ")});
	var n = parseInt(input[0][0], 10);
	var vec_a = input[1].map(e => parseInt(e, 10));
	var vec_s = [];
	var tmp = 0;
	for (var i = 0; i < n; i++){
		tmp += vec_a[i];
		vec_s.push(tmp);
	}

	var ans1 = 0;
	var tmpMovedAbs = 0
	var tmpMovedAll = 0;
	for (var i = 0; i < n; i ++){
		if (i % 2 === 0){
			tmpMovedAbs = Math.max(vec_s[i] + 1 + tmpMovedAll, 0);
			tmpMovedAll -= tmpMovedAbs;
		} else {
			tmpMovedAbs = Math.max(1 - vec_s[i] - tmpMovedAll, 0);
			tmpMovedAll += tmpMovedAbs;
		}
		ans1 += tmpMovedAbs;
	}
	var ans2 = 0;
	tmpMovedAbs = 0
	tmpMovedAll = 0;
	for (var i = 0; i < n; i ++){
		if (i % 2 === 1){
			tmpMovedAbs = Math.max(vec_s[i] + 1 + tmpMovedAll, 0);
			tmpMovedAll -= tmpMovedAbs;
		} else {
			tmpMovedAbs = Math.max(1 - vec_s[i] - tmpMovedAll, 0);
			tmpMovedAll += tmpMovedAbs;
		}
		ans2 += tmpMovedAbs;
	}
	console.log(Math.min(ans1, ans2));
}

Main(require("fs").readFileSync("/dev/stdin", "utf8")); 