using System;
using System.Collections.Generic;
using System.Diagnostics;
using System.Linq;
using System.Text;

class Program
{
    static int n;
    static int[] a;

    public static void Main(string[] args)
    {
        n = Input.NextInt();
        var a = Input.LineInt();

        int minmove = int.MaxValue;
        minmove = Calc(a);
        for (int i = 0; i < a.Length; i++)
        {
            a[i] = -a[i];
        }
        minmove = Math.Min(minmove, Calc(a));

        Console.WriteLine(minmove);
    }

    private static int Calc(int[] a)
    {
        int curr = 0;
        int move = 0;
        for (int i = 0; i < a.Length; i++)
        {
            int dif = 0;
            switch (i % 2)
            {
                case 0:
                    {
                        var newc = curr + a[i];
                        dif = newc <= 0 ? 1 - newc : 0;
                    }
                    break;
                case 1:
                    {
                        var newc = curr + a[i];
                        dif = newc >= 0 ? -1 - newc : 0;
                    }
                    break;
            }
            curr += a[i] + dif;
            move += Math.Abs(dif);
        }

        return move;
    }
}

public static class Input
{
    private static Queue<string> q = new Queue<string>();
    private static void Confirm() { if (q.Count == 0) foreach (var s in Console.ReadLine().Split(' ')) q.Enqueue(s); }
    public static int NextInt() { Confirm(); return int.Parse(q.Dequeue()); }
    public static long NextLong() { Confirm(); return long.Parse(q.Dequeue()); }
    public static string NextString() { Confirm(); return q.Dequeue(); }
    public static double NextDouble() { Confirm(); return double.Parse(q.Dequeue()); }
    public static int[] LineInt() { return Console.ReadLine().Split(' ').Select(int.Parse).ToArray(); }
    public static long[] LineLong() { return Console.ReadLine().Split(' ').Select(long.Parse).ToArray(); }
    public static string[] LineString() { return Console.ReadLine().Split(' ').ToArray(); }
    public static double[] LineDouble() { return Console.ReadLine().Split(' ').Select(double.Parse).ToArray(); }
}
