module Main(main) where

import Control.Applicative
import Control.Monad
import Data.List
import Data.Array
import Data.Char
import qualified Data.Set as S

main = do
  n <- (read::String -> Int) <$> getLine
  arr <- map (read::String -> Int) . words <$> getLine
  print $ calcCost arr


calcCost::[Int] -> Int
calcCost (x:xs)
  | x /= 0 = snd $ foldl (\(s, c) v -> let next = calcNext s in if next * v > 0 && abs v > abs next then (s + v, c) else (s + next, c + abs (next - v))) (x, 0) xs
  | otherwise = let plus = 1 + calcCost (1:xs)
                    minus = 1 + calcCost ((-1):xs)
                in min plus minus

calcNext::Int -> Int
calcNext a = if a > 0 then -a - 1 else -a + 1
