You are given $n$ numbers $a_1, a_2, \dots, a_n$. With a cost of one coin you can perform the following operation:

Choose one of these numbers and add or subtract $1$ from it.

In particular, we can apply this operation to the same number several times.

We want to make the product of all these numbers equal to $1$, in other words, we want $a_1 \cdot a_2$ $\dots$ $\cdot a_n = 1$. 

For example, for $n = 3$ and numbers $[1, -3, 0]$ we can make product equal to $1$ in $3$ coins: add $1$ to second element, add $1$ to second element again, subtract $1$ from third element, so that array becomes $[1, -1, -1]$. And $1\cdot (-1) \cdot (-1) = 1$.

What is the minimum cost we will have to pay to do that?


-----Input-----

The first line contains a single integer $n$ ($1 \le n \le 10^5$) — the number of numbers.

The second line contains $n$ integers $a_1, a_2, \dots, a_n$ ($-10^9 \le a_i \le 10^9$) — the numbers.


-----Output-----

Output a single number — the minimal number of coins you need to pay to make the product equal to $1$.


-----Examples-----
Input
2
-1 1

Output
2
Input
4
0 0 0 0

Output
4
Input
5
-5 -3 5 3 0

Output
13


-----Note-----

In the first example, you can change $1$ to $-1$ or $-1$ to $1$ in $2$ coins.

In the second example, you have to apply at least $4$ operations for the product not to be $0$.

In the third example, you can change $-5$ to $-1$ in $4$ coins, $-3$ to $-1$ in $2$ coins, $5$ to $1$ in $4$ coins, $3$ to $1$ in $2$ coins, $0$ to $1$ in $1$ coin.

Difficulty: EASY
Tags: Dynamic programming

Implementation
Skill types: Dynamic programming

Starter code:

Solutions:
n = int(input())
l = [int(x) for x in input().split()]
x = 0
count = 0
p = 0
for i in range(n):
	if l[i] == -1:
		x += 1
	elif l[i] < 0:
		count += -1 - l[i]
		x += 1
	elif l[i] == 0:
		p += 1
	else:
		count += l[i] - 1
if p != 0:
	print(count + p)
elif x & 1 == 1:
	print(count + 2)
else:
	print(count)


import sys
s = sys.stdin.read()

def splitter(s):
	return s.split('\n')[1].split(' ')

def solution(s):
	count = 0
	minus_signs = 0
	zeroes = 0
	for i in s:
		i = int(i)
		if i != 0:
			count += abs(i) - 1
			if i < 0:
				minus_signs += 1
		else:
			count += 1
			zeroes += 1
	if zeroes == 0 and minus_signs % 2 == 1:
		count += 2
	return str(count)
lst = splitter(s)
x = solution(lst)
print(x)


n = int(input())
a = list(map(int, input().split()))
c = 0
pn = 0
mn = 0
zn = 0
for e in a:
	if e == 0:
		zn += 1
		continue
	if e > 0:
		c += e - 1
		pn += 1
	elif e < 0:
		c += -e - 1
		mn += 1
if mn % 2 == 1 and zn == 0:
	c += 2
else:
	c += zn
print(c)


N = int(input())
integers = list(map(int, input().split()))
minus = 0
zeros = 0
answer = 0
for n in range(N):
	if integers[n] < 0:
		minus += 1
		answer += -1 - integers[n]
	elif integers[n] > 0:
		answer += integers[n] - 1
	else:
		zeros += 1
if zeros > 0:
	answer += zeros
elif minus % 2 != 0:
	answer += 2
print(answer)


n = int(input())
A = list(map(int, input().split()))
res = 0
if 0 in A:
	for a in A:
		if a != 0:
			res += abs(a) - 1
		else:
			res += 1
	print(res)
else:
	count = 0
	for a in A:
		res += abs(a) - 1
		if a < 0:
			count += 1
	if count % 2 == 0:
		print(res)
	else:
		print(res + 2)


from math import factorial
n = int(input())
nums = [int(x) for x in input().split(' ')]
answer = 0
cntNegative = 0
cntZero = 0
negativePlus = 0
positiveMinus = 0
for num in nums:
	if num > 1:
		positiveMinus += num - 1
	if num < -1:
		negativePlus += abs(num + 1)
	if num == 0:
		cntZero += 1
	if num < 0:
		cntNegative += 1
answer += negativePlus
answer += positiveMinus
if cntZero == 0 and cntNegative % 2 == 0:
	print(answer)
elif cntZero == 0 and cntNegative % 2 != 0:
	print(answer + 2)
elif cntZero != 0 and cntNegative % 2 == 0:
	print(answer + 1 * cntZero)
elif cntZero != 0 and cntNegative % 2 != 0:
	print(answer + cntZero)


n = int(input())
l = list(map(int, input().split()))
su = 0
(pos, neg) = (0, 0)
zer = 0
for i in l:
	if i == 0:
		zer += 1
	elif i >= 1:
		su += i - 1
		pos += 1
	else:
		su += abs(i + 1)
		neg += 1
su += zer
if neg % 2 == 1:
	if zer == 0:
		su += 2
print(su)


n = int(input())
tabela = input().split(' ')
for num in range(len(tabela)):
	tabela[num] = int(tabela[num])
coins = 0
mul = 1
ima_nulo = 0
for elem in tabela:
	if elem > 0:
		coins += abs(elem - 1)
		mul *= 1
	if elem < 0:
		coins += abs(elem + 1)
		mul *= -1
	if elem == 0:
		ima_nulo += 1
coins += ima_nulo
if mul != 1:
	if ima_nulo == 0:
		coins += 2
print(coins)


import math
import sys, string, bisect
input = sys.stdin.readline
import random
from collections import deque, defaultdict
L = lambda : list(map(int, input().split()))
Ls = lambda : list(input().split())
M = lambda : map(int, input().split())
I = lambda : int(input())
n = I()
l = L()
c = 0
z = 0
w = 0
for i in range(n):
	if l[i] >= 1:
		c += l[i] - 1
	elif l[i] <= -1:
		c += -1 - l[i]
		w += 1
	else:
		z += 1
if w % 2 == 0:
	c += z
elif z == 0:
	c += 2
else:
	c += z
print(c)


n = int(input())
coins = sorted([int(i) for i in input().split()])
count = 0
k = 0
negative = 0
for i in range(len(coins)):
	if coins[i] < 0:
		negative += 1
		count += -1 - coins[i]
	elif coins[i] > 0:
		count += coins[i] - 1
	else:
		k += 1
if negative % 2 == 0:
	print(count + k)
elif k != 0:
	print(count + k)
else:
	print(count + 2)


def minOperations(arr):
	n = len(arr)
	operations = 0
	numNegatives = 0
	maxNegative = None
	isZeroPresent = False
	for i in range(n):
		if arr[i] < 0:
			numNegatives += 1
			operations += abs(arr[i] + 1)
			if maxNegative is None or arr[i] > maxNegative:
				maxNegative = arr[i]
		elif arr[i] == 0:
			isZeroPresent = True
			operations += 1
		else:
			operations += abs(arr[i] - 1)
	if numNegatives % 2 != 0 and isZeroPresent == False:
		operations += 2
	return operations
n = int(input())
arr = list()
values = input().split()
for i in range(n):
	arr.append(int(values[i]))
print(minOperations(arr))


n = int(input())
a = [int(i) for i in input().split()]
neg = 0
zero = 0
cost = 0
for i in a:
	if i < 0:
		neg += 1
	elif i == 0:
		zero += 1
	cost += abs(abs(i) - 1)
if neg % 2 == 0:
	print(cost)
elif zero > 0:
	print(cost)
else:
	print(cost + 2)


t = 1
while t:
	t -= 1
	n = int(input())
	l = list(map(int, input().split()))
	cnt = 0
	o = 0
	f = 0
	for i in l:
		if i > 1:
			cnt += i - 1
		elif i <= -1:
			cnt += abs(i) - 1
			o += 1
		elif i == 0:
			f = 1
			cnt += 1
	if o % 2 and f:
		cnt += 0
	elif o % 2:
		cnt += 2
	print(cnt)


n = int(input())
a = list(map(int, input().split()))
c = 0
zero = 0
one_minus = 0
for i in range(n):
	if a[i] == -1:
		one_minus += 1
	elif a[i] == 0:
		zero += 1
	elif a[i] > 1:
		c += a[i] - 1
	elif a[i] < -1:
		c += abs(a[i] + 1)
		one_minus += 1
if one_minus % 2 != 0:
	if zero != 0:
		zero -= 1
		c += 1
	else:
		c += 2
c += zero
print(c)


n = int(input())
a = list(map(int, input().split()))
answer = 0
negative = 0
for i in range(n):
	answer += abs(abs(a[i]) - 1)
	if a[i] < 0:
		negative += 1
if negative % 2 == 1:
	if 0 not in a:
		answer += 2
print(answer)


from sys import stdin, stdout
from collections import Counter
from itertools import permutations
import bisect
import math
I = lambda : map(int, stdin.readline().split())
I1 = lambda : stdin.readline()
l = int(I1())
a = list(I())
(c, z, ans) = (0, 0, 0)
for x in a:
	if x == 1:
		pass
	elif x > 0:
		ans += x - 1
	elif x < 0:
		ans += abs(x) - 1
		c += 1
	else:
		z += 1
ans += z
if c % 2 != 0:
	if z == 0:
		ans += 2
print(ans)


n = input()
a = list(map(int, input().split()))
answer = 0
cnt_minus = 0
cnt_0 = 0
for i in a:
	if i < 0:
		answer += abs(i + 1)
		cnt_minus += 1
	if i == 0:
		answer += 1
		cnt_0 += 1
	if i > 0:
		answer += abs(i - 1)
if cnt_0 == 0:
	if cnt_minus % 2 == 0:
		print(answer)
	else:
		print(answer + 2)
else:
	print(answer)


t = int(input())
l = list(map(int, input().split()))
p = 0
n = 0
x = 0
y = 0
for i in range(t):
	if l[i] > 0:
		p += abs(l[i] - 1)
	elif l[i] == 0:
		y += 1
	else:
		x += 1
		n += abs(l[i] + 1)
if x % 2 == 1:
	if y > 0:
		print(n + p + y)
	else:
		print(p + n + 2)
else:
	print(n + p + y)


n = int(input())
s = list(map(int, input().split()))
cur = []
ans = 0
for i in s:
	if i >= 0:
		ans += abs(i - 1)
	else:
		cur.append(i)
for i in cur:
	ans += abs(i + 1)
if len(cur) % 2 != 0:
	if 0 not in s:
		ans += 2
print(ans)


a = int(input())
b = list(map(int, input().split()))
s = 0
k = 1
for i in range(len(b)):
	if abs(b[i] - 1) <= abs(b[i] + 1):
		s += abs(b[i] - 1)
		k = k * 1
	else:
		s += abs(b[i] + 1)
		k = k * -1
if k == 1:
	print(s)
elif b.count(0) > 0:
	print(s)
else:
	print(s + 2)


n = int(input())
a = list(map(int, input().split()))
(cnt, cnt0) = (0, 0)
for i in a:
	if i < 0:
		cnt += 1
	if i == 0:
		cnt0 += 1
ans = 0
for i in a:
	if i == 0:
		ans += 1
	elif i != 1:
		ans += abs(i) - 1
if cnt0 == 0:
	if cnt % 2 != 0:
		ans += 2
print(ans)


n = int(input())
a = [int(i) for i in input().split()]
arr = []
brr = []
ans = 0
for i in a:
	if i >= 0:
		arr.append(i)
	else:
		brr.append(i)
if len(brr) % 2 != 0:
	if 0 not in arr:
		ans += abs(brr[0] - 1)
		brr.pop(0)
if len(brr) > 0:
	for i in brr:
		if i != -1:
			ans += abs(i + 1)
for i in arr:
	if i != 1:
		ans += abs(i - 1)
print(ans)


import sys
n = int(input())
a = [*map(int, input().split())]
chk = []
chk2 = []
zero = 0
for i in a:
	if i < 0:
		chk.append(i)
	elif i > 0:
		chk2.append(i)
	else:
		zero += 1
t = 0
if len(chk) % 2 == 0 or (len(chk) % 2 == 1 and zero):
	t = -len(chk) - sum(chk)
else:
	t = -len(chk) - sum(chk) + 2
print(sum(chk2) - len(chk2) + t + zero)


N = int(input())
Ns = list(map(int, input().split()))
neg = 0
pos = 0
neg_sum = 0
pos_sum = 0
nzero = 0
coins = 0
for n in Ns:
	if n < 0:
		neg += 1
		neg_sum += n
	if n > 0:
		pos += 1
		pos_sum += n
	if n == 0:
		nzero += 1
coins = -1 * neg_sum - neg + (pos_sum - pos)
if neg % 2:
	if nzero > 0:
		coins += 1
		nzero -= 1
	else:
		coins += 2
coins += nzero
print(coins)


a = int(input())
A = input().split()
for x in range(a):
	A[x] = int(A[x])
total = 0
zeroes_flag = False
for x in range(a):
	if A[x] != 0:
		total += abs(A[x]) - 1
	else:
		total += 1
		zeroes_flag = True
	if A[x] > 0:
		A[x] = 1
	else:
		A[x] = -1
flag = False
if not zeroes_flag:
	for x in A:
		if x == -1 and flag == False:
			flag = True
		elif x == -1 and flag == True:
			flag = False
if flag:
	total += 2
print(total)


a = int(input())
b = list(map(int, input().split()))
b.sort()
c = len(b)
i = 0
d = 0
e = 0
while i < c:
	if b[i] < 0:
		d += 1
	i += 1
if d % 2 == 0:
	for j in range(d):
		e += abs(b[j] + 1)
	for j in range(d, c):
		e += abs(b[j] - 1)
	print(e)
elif d == c:
	for j in range(d):
		e += abs(b[j] + 1)
	print(e + 2)
else:
	for j in range(d + 1):
		e += abs(b[j] + 1)
	for j in range(d + 1, c):
		e += abs(b[j] - 1)
	print(e)


n = int(input())
l = [int(x) for x in input().split()]
counter = 0
neg = 0
z = 0
for el in l:
	if el == 0:
		z += 1
	if abs(el + 1) < abs(el - 1):
		neg += 1
	counter += min(abs(el + 1), abs(el - 1))
if neg % 2 == 0:
	print(counter)
elif z != 0:
	print(counter)
else:
	print(counter + 2)


n = int(input())
a = list(map(int, input().split(' ')))
prod = 1
ans = 0
flag = 0
for i in range(n):
	if abs(a[i]) > 0:
		ans += abs(a[i]) - 1
		if a[i] < 0:
			prod *= -1
	else:
		ans += 1
		flag = 1
if prod == -1 and flag == 0:
	ans += 2
print(ans)


n = int(input())
l = list(map(int, input().split()))
(cn, cz) = (0, 0)
c = 0
for i in l:
	if i < 0:
		cn += 1
	elif i == 0:
		cz += 1
	c += min(abs(i - -1), abs(i - 1))
if cn % 2 == 1:
	if cz >= 1:
		print(c)
	else:
		print(c + 2)
else:
	print(c)


o = int(input())
p = input().rstrip().split(' ')
l = []
q = []
w = []
for i in range(0, len(p)):
	if int(p[i]) > 0:
		l.append(int(p[i]))
	elif int(p[i]) < 0:
		q.append(int(p[i]))
	else:
		w.append(int(p[i]))
q.sort(key=int)
l.sort(key=int, reverse=True)
A = len(q) // 2
B = len(l) // 2
D = 0
V = 0
VV = 0
for i in range(0, A):
	D += abs(int(q[V]) + 1)
	V += 1
	D += abs(int(q[V]) + 1)
	V += 1
for i in range(0, B):
	D += abs(int(l[VV]) - 1)
	VV += 1
	D += abs(int(l[VV]) - 1)
	VV += 1
if len(l) % 2 == 0 and len(q) % 2 == 0:
	print(D + len(w))
elif len(q) % 2 == 0:
	D += abs(int(l[len(l) - 1]) - 1)
	print(D + len(w))
elif len(l) % 2 == 0:
	if len(w) != 0:
		D += abs(int(q[len(q) - 1]) + 1)
		print(D + len(w))
	else:
		D += abs(int(q[len(q) - 1]) + 1) + 2
		print(D)
else:
	A = l[len(l) - 1]
	B = q[len(q) - 1]
	if len(w) == 0:
		a = A - 1
		b = abs(B + 1) + 2
		c = a + 2
		d = b - 2
		print(D + min(a + b, c + d))
	else:
		V = abs(B + 1)
		print(D + A - 1 + V + len(w))


n = int(input())
l = list(map(int, input().split()))
r = 0
p = 0
z = 0
for i in range(n):
	if l[i] < 0:
		r += abs(l[i] + 1)
		p += 1
	elif l[i] > 0:
		r += abs(l[i] - 1)
	else:
		z += 1
r = r + z
if p % 2 != 0 and z == 0:
	print(r + 2)
else:
	print(r)


n = int(input())
arr = list(map(int, input().split()))
(ans, pro, flag, zcount) = (0, 1, False, 0)
for i in range(n):
	if arr[i] < 0:
		ans += -1 - arr[i]
		pro *= -1
	elif arr[i] > 0:
		ans += arr[i] - 1
		pro *= 1
	else:
		zcount += 1
		flag = True
if flag:
	if pro == -1:
		ans += zcount
		pro *= -1
	else:
		ans += zcount
elif pro == -1:
	ans += 2
	pro *= -1
print(ans)


n = int(input())
a = list(map(int, input().split()))
no = []
po = []
z = []
c = 0
for i in a:
	if i < 0:
		no.append(i)
	elif i == 0:
		z.append(i)
	elif i > 0:
		po.append(i)
for j in po:
	c += j - 1
for k in no:
	c += -k - 1
if len(no) % 2 == 0:
	print(c + len(z))
elif len(no) % 2 != 0 and len(z) == 0:
	print(c + 2 + len(z))
elif len(no) % 2 != 0 and len(z) != 0:
	print(c + len(z))


n = int(input())
ns = sorted(list(map(int, input().split())))
cont = 0
for i in range(0, n, 2):
	if i < n - 1:
		t1 = abs(ns[i] + 1)
		t2 = abs(ns[i + 1] + 1)
		t3 = abs(ns[i] - 1)
		t4 = abs(ns[i + 1] - 1)
		cont += min(t1 + t2, t3 + t4)
	else:
		cont += abs(ns[i] - 1)
print(cont)


n = int(input())
a = list(map(int, input().split()))
k = 0
k_otr = 0
k_zero = 0
for a_i in a:
	if a_i == 0:
		k_zero += 1
	else:
		k += abs(a_i) - 1
	if a_i < 0:
		k_otr += 1
if k_otr % 2 != 0:
	if k_zero == 0:
		k += 2
if k_zero > 0:
	k += k_zero
print(k)


def main():
	n = int(input())
	k = 0
	a = list(map(int, input().split()))
	l = 0
	g = 0
	z = 0
	for i in a:
		if i < 0:
			k += -1 - i
			l += 1
		if i == 0:
			z += 1
			k += 1
		if i > 0:
			k += i - 1
	if l % 2 == 1:
		if z == 0:
			k += 2
	print(k)
	return
main()


n = input()
a = list(map(int, input().split()))
sum = 0
zeroExists = False
negatives = 0
for (i, el) in enumerate(a):
	if el < 0:
		sum += -1 - el
		negatives += 1
	elif el > 0:
		sum += el - 1
	else:
		sum += 1
		zeroExists = True
if negatives % 2 == 1 and (not zeroExists):
	sum += 2
print(sum)


n = int(input())
list1 = input().split(' ')
arr = []
for item in list1:
	arr.append(int(item))
total = 0
zeros = 0
for index in range(len(arr)):
	if arr[index] < 0:
		total += abs(arr[index]) - 1
		arr[index] = -1
	elif arr[index] > 0:
		total += arr[index] - 1
		arr[index] = 1
	else:
		zeros += 1
negative = arr.count(-1)
if negative % 2 == 0:
	if zeros != 0:
		total += zeros
elif zeros != 0:
	total += zeros
else:
	total += 2
print(f'{total}')


n = int(input())
nums = list(map(int, input().split()))
nMenos = 0
moedas = 0
zeros = 0
for e in nums:
	if e > 0:
		moedas += e - 1
	elif e < 0:
		moedas += abs(e) - 1
		nMenos += 1
	else:
		zeros += 1
if nMenos % 2 == 0:
	moedas += zeros
elif zeros > 0:
	zeros -= 1
	moedas += zeros + 1
else:
	moedas += 2
print(moedas)


n = int(input())
l = list(map(int, input().split()))
(x, y, z) = (0, 0, 0)
a = 0
for i in l:
	if i < 0:
		x = x + abs(i + 1)
		a = a + 1
	elif i >= 1:
		y = abs(i - 1) + y
	elif i == 0:
		z = z + 1
c = z + y + x
if a % 2 == 1:
	if z == 0:
		c = c + 2
print(c)


n = int(input())
l = list(map(int, input().split()))
d = 0
c = 0
zero = 0
for i in l:
	if i != 0:
		d += i * -1 - 1 if i < 0 else (1 - i) * -1
	if i < 0:
		c += 1
	if i == 0:
		zero += 1
if c % 2 == 0:
	d += zero
elif c % 2 != 0 and zero == 0:
	d += 2
elif c % 2 != 0 and zero != 0:
	d += zero
print(d)


import sys
input = sys.stdin.readline
prnt = sys.stdout.write
n = int(input())
a = list(map(int, input().split()))
res = 0
cntn = 0
cnt0 = 0
for i in range(n):
	if a[i] < 0:
		res += -1 - a[i]
		cntn += 1
	elif a[i] > 0:
		res += a[i] - 1
	else:
		cnt0 += 1
if cnt0 > 0:
	res += cnt0
elif cntn % 2:
	res += 2
prnt(str(res))


n = int(input())
arr = input()
arr = arr.split(' ')
for i in range(0, len(arr)):
	arr[i] = int(arr[i])
arr.sort()
neg = []
pos = []
for i in range(0, len(arr)):
	if arr[i] <= 0:
		neg.append(arr[i])
	else:
		pos.append(arr[i])
count = 0
if len(neg) % 2 == 0:
	for i in range(0, len(neg)):
		count += abs(-1 - neg[i])
	for i in range(0, len(pos)):
		count += abs(pos[i] - 1)
else:
	for i in range(0, len(neg) - 1):
		count += abs(-1 - neg[i])
	count += abs(1 - neg[len(neg) - 1])
	for i in range(0, len(pos)):
		count += abs(pos[i] - 1)
print(count)


def solve(a, n):
	neg = 0
	pos = 0
	dist = 0
	zero = 0
	for i in a:
		if i < 0:
			neg += 1
		elif i == 0:
			zero += 1
		else:
			pos += 1
	res = 0
	if neg % 2 == 0 or (neg % 2 == 1 and zero > 0):
		for i in a:
			if i < 0:
				diff = abs(i + 1)
				res += diff
			else:
				diff = abs(i - 1)
				res += diff
		return res
	else:
		for i in a:
			if i < 0:
				diff = abs(i + 1)
				res += diff
			else:
				diff = abs(i - 1)
				res += diff
		return res + 2
n = int(input())
a = list(map(int, input().split()))
print(solve(a, n))


input()
r = a = b = 0
for x in map(int, input().split()):
	if x > 0:
		r += x - 1
	elif x < 0:
		r -= x + 1
		b += 1
	else:
		a += 1
print(r + a + (a < 1) * b % 2 * 2)


n = int(input())
mylist = list(map(int, input().split()))
sum = 0
count = 0
zero = 0
for i in range(len(mylist)):
	if mylist[i] >= 0:
		sum += abs(mylist[i] - 1)
		if mylist[i] == 0:
			zero += 1
	else:
		count += 1
		sum += abs(mylist[i] + 1)
if count % 2 != 0:
	if zero != 0:
		print(sum)
	else:
		print(sum + 2)
else:
	print(sum)


n = int(input())
a = list(map(int, input().split(' ')))
(df, c) = (0, 0)
flag = True
for q in a:
	if q == 0:
		flag = False
	if q < 0:
		q = -q
		c += 1
	df += q - 1 if q - 1 >= 0 else 1 - q
print(df + 2 if c % 2 and flag else df)


n = int(input())
arr = list(map(int, input().split()))
count_neg = ans = count_zero = 0
for i in arr:
	if i == -1:
		count_neg += 1
	elif i > 0:
		ans += i - 1
	elif i < 0:
		ans += abs(i) - 1
		count_neg += 1
	else:
		count_zero += 1
if count_neg % 2 != 0:
	if count_zero > 0:
		ans += count_zero
	else:
		ans += 2
else:
	ans += count_zero
print(ans)


n = int(input())
li = list(map(int, input().split()))
c = 1
s = 0
for i in li:
	if i < 0:
		s += -(i + 1)
		c = c * -1
	elif i > 0:
		s += i - 1
o = 0
if c == -1:
	if o not in li:
		s += 2
s += li.count(o)
print(s)


n = int(input())
A = list(map(int, input().split()))
x = 0
y = 0
c = 0
for i in A:
	if i == 0:
		x += 1
	if i < 0:
		y += 1
	c += max(abs(i) - 1, 1 - abs(i))
if y % 2 != 0 and x == 0:
	c += 2
print(c)


arr = []
coin = 0
count1 = 0
count2 = 0
n = int(input())
arr = list(map(int, input().split()))
for i in range(0, n):
	if arr[i] < 0:
		temp = -1 - arr[i]
		count1 += 1
		coin += temp
	elif arr[i] == 0:
		count2 += 1
	else:
		temp1 = arr[i] - 1
		coin += temp1
if count1 % 2 != 0 and count2 > 0:
	coin += 1
	count2 -= 1
elif count1 % 2 != 0 and count2 == 0:
	coin += 2
if count2 > 0:
	coin += count2
print(coin)


n = int(input())
a = [int(i) for i in input().split()]
dp = a[:]
c = 0
for i in range(n):
	if a[i] > 1:
		c += a[i] - 1
		dp[i] = 1
	elif a[i] < -1:
		c += -1 - a[i]
		dp[i] = -1
n = dp.count(-1)
z = dp.count(0)
p = dp.count(1)
if n & 1:
	if z > 0:
		for i in range(n):
			if dp[i] == 0:
				dp[i] = -1
				c += 1
				z -= 1
				break
	else:
		c += 2
		n -= 1
c += z
print(c)


n = int(input())
x = list(map(int, input().split()))[:n]
s = 0
l = 0
m = 0
for i in range(n):
	if x[i] > 1:
		s += x[i] - 1
	elif x[i] == 0:
		s += 1
		m += 1
	elif x[i] < -1:
		s += -1 - x[i]
		l += 1
	elif x[i] == -1:
		l += 1
if l % 2 != 0:
	if m == 0:
		s += 2
print(s)


n = int(input())
v = list(map(int, input().split()))
ans = 0
nP = nN = nZ = 0
for i in range(len(v)):
	if v[i] >= 1:
		nP += 1
		ans += v[i] - 1
	elif v[i] <= -1:
		nN += 1
		ans += -1 - v[i]
	else:
		nZ += 1
if nN % 2 == 0 or nZ > 0:
	ans += nZ
else:
	ans += 2
print(ans)


n = int(input())
(*a,) = map(int, input().split())
s = [abs(abs(int(i)) - 1) for i in a]
print([sum(s), sum(s) + 2][len([i for i in a if i < 0]) % 2 and (not a.count(0))])


s = int(input())
x = list(map(int, input().split()))
c = 0
p = 0
n = 0
z = 0
for i in x:
	if i > 0:
		c += abs(i - 1)
		p += 1
	elif i < 0:
		c += abs(i + 1)
		n += 1
	else:
		c += 1
		z += 1
if n % 2 == 0:
	print(c)
elif z > 0:
	print(c)
else:
	print(c + 2)


n = int(input())
arr = list(map(int, input().split()))
product = 1
result = 0
zeros = 0
for num in arr:
	if num > 0:
		temp = num - 1
		result += temp
	elif num < 0:
		temp = -1 - num
		product *= -1
		result += temp
	else:
		zeros += 1
		result += 1
if product < 0 and zeros <= 0:
	result += 2
print(result)


size1 = int(input())
a1 = list(map(int, input().split()))
coin = 0
zeroexist = False
countnegative = 0
for i in a1:
	if i == 1:
		pass
	elif i == 0:
		zeroexist = True
		coin += 1
	elif i == -1:
		countnegative += 1
	else:
		difference = i + 1 if i < 0 else i - 1
		countnegative = countnegative + 1 if difference < 0 else countnegative
		coin = coin - difference if difference < 0 else difference + coin
if countnegative % 2 == 0 or zeroexist == True:
	print(coin)
else:
	print(coin + 2)


x = input()
first = map(int, input().split(' '))
product = 1
hasZero = False
cost = 0
for val in first:
	if val == 0:
		hasZero = 1
		cost += 1
	elif abs(val - 1) < abs(val + 1):
		cost += abs(val - 1)
	else:
		cost += abs(val + 1)
		product *= -1
if product == -1 and hasZero == False:
	cost += 2
print(cost)


n = int(input())
array = list(map(int, input().split()))
coins = 0
zero = 0
negs = 0
pos = 0
for i in range(len(array)):
	if array[i] == 0:
		zero += 1
	elif array[i] > 0:
		coins += array[i] - 1
		array[i] = 1
		pos += 1
	else:
		coins += -1 - array[i]
		array[i] = -1
		negs += 1
if zero == 0:
	if negs % 2 == 0:
		print(coins)
	else:
		print(coins + 2)
else:
	print(coins + zero)


input()
n_neg = n_pos = n_zero = 0
total_neg = total_pos = 0
for v in map(int, input().split()):
	if v < 0:
		n_neg += 1
		total_neg += -v
	elif v > 0:
		n_pos += 1
		total_pos += v
	else:
		n_zero += 1
total = total_neg - n_neg + total_pos - n_pos + n_zero
if n_neg % 2 == 1 and n_zero == 0:
	print(total + 2)
else:
	print(total)


n = input()
arr = map(int, input().split())
ans = 0
neg = 0
zeroes = 0
for i in arr:
	if i < 0:
		ans += -1 - i
		neg += 1
	elif i > 0:
		ans += i - 1
	else:
		zeroes += 1
if neg % 2 == 0:
	print(ans + zeroes)
elif zeroes > 0:
	print(ans + zeroes)
else:
	print(ans + 2)


n = int(input())
arr = [int(x) for x in input().split()]
count_zeros = 0
sum = 0
negatives = 0
for v in arr:
	if v == 0:
		count_zeros += 1
	elif v > 0:
		sum += v - 1
	else:
		sum += -1 - v
		negatives += 1
if count_zeros > 0 and negatives % 2 == 1 or negatives % 2 == 0:
	sum += count_zeros
else:
	sum += 2
print(sum)


n = int(input())
arr = list(map(int, input().split()))
(cnt_1, cnt, cnt_0, occ) = (0, 0, 0, 0)
for i in arr:
	if i >= 1:
		cnt_1 += i - 1
	elif i <= -1:
		cnt += -1 - i
		occ += 1
	else:
		cnt_0 += 1
if occ % 2 == 0:
	print(cnt + cnt_0 + cnt_1)
elif occ % 2 == 1 and cnt_0 != 0:
	print(cnt + cnt_0 + cnt_1)
elif occ % 2 == 1 and cnt_0 == 0:
	print(cnt + cnt_0 + cnt_1 + 2)
else:
	print(cnt + cnt_0 + cnt_1 + 1)


n = int(input())
entrada = input().split(' ')
count = 0
arr = []
result = []

def count_neg(arr, n):
	neg = 0
	for i in range(n):
		if arr[i] < 0:
			neg += 1
	return neg
for i in range(n):
	arr.append(int(entrada[i]))
neg = count_neg(arr, n)
for i in range(n):
	if arr[i] > 1:
		count += arr[i] - 1
		result.append(1)
	elif arr[i] < -1:
		count += -1 - arr[i]
		result.append(-1)
	elif arr[i] == 0:
		if neg != 1 and neg % 2 == 0:
			result.append(1)
		else:
			result.append(-1)
			neg -= 1
		count += 1
	else:
		result.append(arr[i])
neg_result = count_neg(result, n)
if neg_result % 2 == 0:
	print(count)
else:
	print(count + 2)


def int_multiple():
	return [int(c) for c in input().split()]

def int_single():
	return int(input())

def str_multiple():
	return [c for c in input().split()]

def str_single():
	return input()
n = int_single()
l = int_multiple()
small = 0
big = 0
betw = 0
res = 0
for el in l:
	if el >= 1:
		res += el - 1
		big += 1
	elif el <= -1:
		res += -1 - el
		small += 1
	else:
		betw += 1
if small % 2 == 1:
	if betw > 0:
		print(res + betw)
	else:
		print(res + 2)
else:
	print(res + betw)


n = int(input())
a = list(map(int, input().split()))
z = 0
neg = 0
ans = 0
for x in a:
	if not x:
		z = 1
	neg += x < 0
	ans += min(abs(x - 1), abs(x + 1))
if neg & 1:
	ans += 2 * (z == 0)
print(ans)


n = int(input())
A = [int(x) for x in input().split(' ')]
res = 0
neg = 0
zero = 0
for x in A:
	if x > 0:
		res += x - 1
	elif x < 0:
		res += -1 - x
		neg += 1
	else:
		res += 1
		zero += 1
if neg % 2 == 1 and zero == 0:
	res += 2
print(res)


n = int(input())
s = list(map(int, input().split()))
ans = 0
ns = False
for i in range(n):
	if s[i] == 0:
		ns = True
	if abs(s[i]) != 1:
		ans += abs(abs(s[i]) - 1)
neg = 0
for i in range(n):
	if s[i] < 0:
		neg += 1
if neg % 2 and (not ns):
	ans += 2
print(ans)


n = int(input())
a = list(map(int, input().split()))
ans = 0
lt = 0
gt = 0
eq = 0
for i in a:
	if i < 0:
		lt += 1
		ans += -1 - i
	elif i > 0:
		gt += 1
		ans += i - 1
	else:
		eq += 1
lt = lt % 2
ans += eq
if lt and (not eq):
	ans += 2
print(ans)


n = int(input())
a = list(map(int, input().split()))
t = 0
s = a.count(0)
b = a.copy()
b.sort()
p = 0
for i in range(len(b)):
	if b[i] < 0:
		p += 1
	else:
		break
if s > 0:
	for i in range(n):
		if a[i] == 1:
			continue
		elif a[i] > 1:
			t = t + a[i] - 1
		elif a[i] == 0:
			t = t + 1
		else:
			t = t - 1 - a[i]
else:
	for i in range(n):
		if a[i] == 1:
			continue
		elif a[i] > 1:
			t = t + a[i] - 1
		elif p % 2 != 0:
			if a[i] == b[p - 1]:
				b[p - 1] = 5
				t = t + 1 - a[i]
			else:
				t = t - 1 - a[i]
		else:
			t = t - 1 - a[i]
print(t)


n = int(input())
a = [int(x) for x in input().split()]
negatives = 0
for i in a:
	if i < 0:
		negatives += 1
min_step = 0
min_step_sign = a[0] > 0
for i in range(n):
	if a[i] > 0:
		if a[min_step] > 0:
			if a[min_step] + 1 > a[i] + 1:
				min_step_sign = True
				min_step = i
		elif abs(a[min_step] - 1) > a[i] + 1:
			min_step_sign = True
			min_step = i
	elif a[min_step] > 0:
		if a[min_step] + 1 > abs(a[i] - 1):
			min_step_sign = False
			min_step = i
	elif abs(a[min_step] - 1) > abs(a[i] - 1):
		min_step_sign = False
		min_step = i
answer = 0
if negatives % 2 == 1:
	if min_step_sign:
		answer += a[min_step] + 1
		a[min_step] = 1
	else:
		answer += abs(a[min_step] - 1)
		a[min_step] = 1
for i in a:
	if i > 0:
		answer += i - 1
	else:
		answer += abs(i + 1)
print(answer)


from sys import stdin
input = stdin.readline
n = int(input())
l = sorted(list(map(int, input().split())))
z = 0
a = 0
for i in range(n):
	if l[i] >= 0:
		z = i
		break
	else:
		z += 1
for i in range(n):
	if l[i] < 0:
		a += abs(-1 - l[i])
	else:
		a += abs(1 - l[i])
if z % 2 == 0:
	print(a)
elif z % 2 == 1 and l.count(0) > 0:
	print(a)
else:
	print(a + 2)


n = int(input())
a = [int(o) for o in input().split()]
pos = []
neg = []
res = 0
z = 0
for i in range(n):
	if a[i] < 0:
		neg.append(a[i])
		res += abs(a[i] + 1)
	elif a[i] > 0:
		pos.append(a[i])
		res += abs(a[i] - 1)
	else:
		z += 1
		res += 1
if len(neg) % 2 != 0 and z == 0:
	res += 2
print(res)


import sys
import math as mt
input = sys.stdin.buffer.readline
t = 1
for __ in range(t):
	n = int(input())
	l = list(map(int, input().split()))
	o = []
	mo = []
	cnt = 0
	mini = 0
	ind = []
	ind1 = []
	ind2 = -1
	for i in range(n):
		o.append(abs(l[i] - 1))
		mo.append(abs(l[i] + 1))
		if o[-1] > mo[-1]:
			ind.append(i)
			cnt += 1
		elif o[-1] == mo[-1]:
			ind2 = i
			ind1.append(i)
		else:
			ind1.append(i)
		mini += min(o[-1], mo[-1])
	if cnt % 2 != 0 and ind2 == -1:
		mi = 10 ** 9 + 5
		for i in ind:
			if mi > abs(l[i] - 1) - abs(l[i] + 1):
				mi = abs(l[i] - 1) - abs(l[i] + 1)
		mi2 = 10 ** 9 + 5
		for i in ind1:
			if mi2 > abs(l[i] + 1) - abs(l[i] - 1):
				mi2 = abs(l[i] + 1) - abs(l[i] - 1)
		mini += min(mi, mi2)
	print(mini)


input()
A = map(int, input().split())
(p, coins, z) = (1, 0, 0)
for x in A:
	if x > 1:
		coins += x - 1
	elif x < 0:
		coins += abs(x) - 1
		p *= -1
	elif x == 0:
		z += 1
if z == 0 and p == -1:
	coins += 2
else:
	coins += z
print(coins)


a = int(input())
l = list(map(int, input().split()))
(z, s, b) = ([], 0, 0)
for x in range(a):
	if l[x] < 0:
		z.append(l[x])
	elif l[x] == 0:
		b += 1
	else:
		s += l[x] - 1
z.sort()
if len(z) % 2 == 0 or len(z) == 0:
	s += b
	for x in range(len(z)):
		s += abs(z[x]) - 1
elif b == 0:
	s += abs(z[-1]) + 1
	for x in range(len(z) - 1):
		s += abs(z[x]) - 1
else:
	s += b
	for x in range(len(z)):
		s += abs(z[x]) - 1
print(s)


n = input()
a = list(map(int, input().split()))
total = 0
for el in a:
	total += abs(abs(el) - 1)
if sum((1 for i in a if i < 0)) % 2 == 1:
	total += int(0 not in a) * 2
print(total)


number = int(input())
data = list(map(int, input().split()))
(neg, pos, result) = (0, 0, 0)
for m in data:
	if m < 0:
		neg += 1
	else:
		pos += 1
if neg % 2 == 0:
	for m in data:
		if m < 0:
			result += abs(m + 1)
		else:
			result += abs(m - 1)
else:
	data.sort()
	if neg < number:
		if data[neg] < abs(data[neg - 1]):
			result += abs(data[neg] + 1)
			data[neg] = -1
		else:
			result += abs(data[neg - 1] - 1)
			data[neg - 1] = 1
	else:
		result += abs(data[neg - 1] - 1)
		data[neg - 1] = 1
	for m in data:
		if m < 0:
			result += abs(m + 1)
		else:
			result += abs(m - 1)
print(result)


(z, zz) = (input, lambda : list(map(int, z().split())))
zzz = lambda : [int(i) for i in stdin.readline().split()]
(szz, graph, mod, szzz) = (lambda : sorted(zz()), {}, 10 ** 9 + 7, lambda : sorted(zzz()))
from string import *
from re import *
from collections import *
from queue import *
from sys import *
from collections import *
from math import *
from heapq import *
from itertools import *
from bisect import *
from collections import Counter as cc
from math import factorial as f
from bisect import bisect as bs
from bisect import bisect_left as bsl
from itertools import accumulate as ac

def lcd(xnum1, xnum2):
	return xnum1 * xnum2 // gcd(xnum1, xnum2)

def prime(x):
	p = ceil(x ** 0.5) + 1
	for i in range(2, p):
		if x % i == 0 and x != 2 or x == 0:
			return 0
	return 1

def dfs(u, visit, graph):
	visit[u] = True
	for i in graph[u]:
		if not visit[i]:
			dfs(i, visit, graph)
n = list(z())
l = zzz()
(ne, po, ze) = (0, 0, 0)
ans = 0
for i in l:
	if i < 0:
		ans += -1 - i
		ne += 1
	elif i == 0:
		ze += 1
	else:
		ans += i - 1
		po += 1
if ne % 2 != 0:
	if ze >= 1:
		ans += ze
	else:
		ans += 2
else:
	ans += ze
print(ans)


n = int(input())
a = list(map(int, input().split()))
kq = 0
tich = 1
s0 = 0
(t1, t2) = (0, 0)
for i in range(n - 1):
	t1 = abs(1 - a[i])
	t2 = abs(-1 - a[i])
	if t1 > t2:
		a[i] = -1
		kq += t2
		tich = tich * -1
	elif t1 < t2:
		a[i] = 1
		kq += t1
	else:
		s0 += 1
		kq += 1
if a[n - 1] == 0:
	kq += 1
else:
	t1 = abs(1 - a[n - 1])
	t2 = abs(-1 - a[n - 1])
	if s0 == 0:
		if tich == 1:
			kq += t1
		else:
			kq += t2
	else:
		kq += min(t1, t2)
print(kq)


def main():
	input()
	a = list(map(int, input().split()))
	c = 0
	for (i, v) in enumerate(a):
		if v < -1:
			c += -1 - v
			a[i] = -1
		elif v > 1:
			c += v - 1
			a[i] = 1
	n = a.count(-1) % 2
	z = a.count(0)
	c += z
	if n and (not z):
		c += 2
	print(c)
main()


from math import *
from copy import *
from string import *
from random import *
from sys import stdin
from sys import maxsize
from operator import *
from itertools import *
from collections import Counter
import math

def bin1(l, r, k, t, b, val, ans):
	if l > r:
		return ans
	else:
		mid = (l + r) // 2
		v = k ** mid
		if v == val:
			return v
		elif v > val:
			ans = mid
			return bin1(mid + 1, r, k, t, b, val, ans)
		else:
			return bin1(l, mid - 1, k, t, b, val, ans)

def bin2(l, r, k, t, b, val, ans):
	if l > r:
		return ans
	else:
		mid = (l + r) // 2
		v = t * k ** mid + b * mid
		if v == val:
			return v
		elif v > val:
			ans = mid
			return bin2(l, mid - 1, k, t, b, val, ans)
		else:
			return bin2(mid + 1, r, k, t, b, val, ans)

def SieveOfEratosthenes(n):
	prime = [True for i in range(n + 1)]
	p = 2
	while p * p <= n:
		if prime[p] == True:
			for i in range(p * p, n + 1, p):
				prime[i] = False
		p += 1
	l = []
	for i in range(2, n + 1):
		if prime[i]:
			l.append(i)
	return l

def bin(l, r, ll, val):
	if l > r:
		return -1
	else:
		mid = (l + r) // 2
		if val >= ll[mid][0] and val <= ll[mid][1]:
			return mid
		elif val < ll[mid][0]:
			return bin(l, mid - 1, ll, val)
		else:
			return bin(mid + 1, r, ll, val)

def deci(n):
	s = ''
	while n != 0:
		if n % 2 == 0:
			n = n // 2
			s = '0' + s
		else:
			n = n // 2
			s = '1' + s
	return s

def diff(s1, s2):
	if len(s1) < len(s2):
		v = len(s1)
		while v != len(s2):
			s1 = '0' + s1
			v = v + 1
	else:
		v = len(s2)
		while v != len(s1):
			s2 = '0' + s2
			v = v + 1
	c = 0
	for i in range(len(s1)):
		if s1[i:i + 1] != s2[i:i + 1]:
			c = c + 1
	return c
from sys import stdin, stdout

def fac(a, b):
	v = a
	while a != b:
		v *= a - 1
		a = a - 1
	return v

def bino(l, r, n):
	if l > r:
		return -1
	else:
		mid = (l + r) // 2
		val1 = math.log(n / mid + 1, 2)
		val2 = int(val1)
		if val1 == val2:
			return val1
		elif val1 < 1.0:
			return bino(l, mid - 1, n)
		else:
			return bino(mid + 1, r, n)

def binary(l, r, ll, val, ans):
	if l > r:
		return ans
	else:
		mid = (l + r) // 2
		if ll[mid] <= val:
			ans = mid + 1
			return binary(mid + 1, r, ll, val, ans)
		else:
			return binary(l, mid - 1, ll, val, ans)

def odd(n, ans, s):
	if n % 2 != 0 or n in s:
		return ans
	else:
		s.add(n)
		return odd(n // 2, ans + 1, s)
n = int(stdin.readline())
l = list(map(int, stdin.readline().split(' ')))
c1 = 0
c2 = 0
count = 0
for i in range(n):
	if l[i] == 0:
		c2 += 1
	elif l[i] > 0:
		count += l[i] - 1
	else:
		count += abs(l[i]) - 1
		c1 += 1
if c1 % 2 != 0:
	if c2 > 0:
		count += c2
	else:
		count += 2
else:
	count += c2
print(count)


n = int(input())
a = list(map(int, input().split(' ')))
neg = 0
pos = 0
zer = 0
res = 0
for i in range(n):
	if a[i] < 0:
		neg += 1
		res += -1 - a[i]
	elif a[i] > 0:
		pos += 1
		res += a[i] - 1
	else:
		zer += 1
		res += 1
if neg % 2 == 1:
	if zer == 0:
		res += 2
print(res)


n = int(input())
a = list(map(int, input().split()))
n_count = 0
p_count = 0
n_sum = 0
p_sum = 0
zero = 0
for i in a:
	if i <= -1:
		n_count += 1
		n_sum -= i + 1
	elif i >= 1:
		p_count += 1
		p_sum += i - 1
	else:
		zero += 1
if n_count % 2 == 1:
	if zero == 0:
		n_sum += 2
k = n_sum + p_sum + zero
print(k)


cnt = int(input())
inp = list(map(int, input().split()))
coin = 0
minus = 0
zero = 0
for i in range(cnt):
	if inp[i] < 0:
		coin += abs(inp[i]) - 1
		minus += 1
	elif inp[i] == 0:
		coin += 1
		zero = 1
	else:
		coin += inp[i] - 1
if minus % 2 == 1 and zero == 0:
	coin += 2
print(coin)


n = int(input())
l = sorted(list(map(int, input().split())))
(c, m, p) = (0, 0, 0)
for i in range(n):
	if l[i] < 0:
		c += abs(l[i] + 1)
		m += 1
	elif l[i] > 0:
		c += abs(l[i] - 1)
	else:
		p += 1
if m % 2 == 0 or p > 0:
	print(c + p)
else:
	print(c + 2)


import sys
input = sys.stdin.readline
n = int(input())
A = list(map(int, input().split()))
tot = 0
zero = 0
pos = 0
neg = 0
for i in range(n):
	if A[i] < 0:
		tot += -1 - A[i]
		neg += 1
	elif A[i] > 0:
		tot += A[i] - 1
		pos += 1
	else:
		zero += 1
if neg % 2 == 0:
	tot += zero
elif zero > 0:
	tot += zero
else:
	tot += 2
print(tot)


import sys
import math
get_string = lambda : sys.stdin.readline().strip()
get_int_list = lambda : list(map(int, sys.stdin.readline().strip().split()))
get_intList_from_str = lambda : list(map(int, list(sys.stdin.readline().strip())))
get_charList_from_str = lambda : list(sys.stdin.readline().strip())
get_char_list = lambda : sys.stdin.readline().strip().split()
get_int = lambda : int(sys.stdin.readline())
pt = lambda x: sys.stdout.write(str(x))
n = get_int()
lst = get_int_list()
count = 0
negative = 0
zeros = 0
for i in range(n):
	if lst[i] < 0:
		negative += 1
	if lst[i] == 0:
		zeros += 1
	else:
		count += abs(abs(lst[i]) - 1)
if zeros > 0:
	print(count + zeros)
elif negative % 2 != 0:
	print(count + 2)
else:
	print(count)


n = input()
array = [int(_) for _ in input().split()]
S = 0
mul = 0
no = 0
for item in range(len(array)):
	if array[item] > 0:
		S += abs(array[item]) - 1
	elif array[item] == 0:
		S += 1
		no = 1
		array[item] = 1
	else:
		S += abs(array[item]) - 1
		mul -= 1
if mul < 0 and mul % 2 == 1 and (no == 0):
	S += 2
print(S)


n = int(input())
a = list(map(int, input().split()))
a.sort()
a.append(0)
cur = a[0]
if n == 1:
	print(abs(1 - a[0]))
	exit()
else:
	b = abs(-1 - a[0])
	b += abs(-1 - a[1])
	c = abs(1 - a[0])
	c += abs(1 - a[1])
	cur = 1
	s = min(b, c)
	for i in range(2, n):
		if a[i] < 0 and a[i + 1] <= 0 and (cur > 0) and (i != n - 1):
			s += abs(-1 - a[i])
			cur = -1
		elif a[i] < 0 and cur < 0:
			s += abs(-1 - a[i])
			cur = 1
		else:
			s += abs(1 - a[i])
			cur = 1
print(s)


import os
import sys
debug = True
if debug and os.path.exists('input.in'):
	input = open('input.in', 'r').readline
else:
	debug = False
	input = sys.stdin.readline

def inp():
	return int(input())

def inlt():
	return list(map(int, input().split()))

def insr():
	s = input()
	return s[:len(s) - 1]

def invr():
	return map(int, input().split())
test_count = 1
for t in range(test_count):
	if debug:
		print('Test Case #', t + 1)
	n = inp()
	a = inlt()
	ans = 0
	negatives = 0
	zeros = 0
	for x in a:
		if x < 0:
			negatives += 1
			ans += abs(x + 1)
		elif x == 0:
			ans += 1
			zeros += 1
		elif x >= 1:
			ans += x - 1
		else:
			ans = ans
	if negatives % 2 == 1 and zeros == 0:
		ans += 2
	print(ans)


import sys
import math
import bisect

def solve(A):
	n = len(A)
	ans = 0
	for i in range(n):
		if A[i] > 1:
			ans += A[i] - 1
			A[i] = 1
		elif A[i] < -1:
			ans += -1 - A[i]
			A[i] = -1
	num_zero = 0
	for a in A:
		if a == 0:
			num_zero += 1
	if num_zero > 0:
		ans += num_zero
		return ans
	val = 1
	for a in A:
		val *= a
	if val == 1:
		return ans
	else:
		return ans + 2

def main():
	n = int(input())
	A = list(map(int, input().split()))
	print(solve(A))
main()


input()
(p, n) = (0, 2)
for x in map(int, input().split()):
	(a, b) = (abs(x - 1), abs(x + 1))
	(p, n) = (min(p + a, n + b), min(n + a, p + b))
print(p)


I = lambda : map(int, input().split())
n = int(input())
li = list(I())
ans = 0
c1 = 0
c2 = 0
c3 = 0
for i in li:
	if i <= -1:
		c1 += 1
		ans += -1 - i
	elif i >= 1:
		c3 += 1
		ans += i - 1
	else:
		c2 += 1
if c1 % 2 == 0:
	exit(print(ans + c2))
if c2 >= 1:
	exit(print(ans + c2))
exit(print(ans + 2))


n = int(input())
a = list(map(int, input().split()))
(ne, po) = ([], [])
(n, p, z) = (0, 0, 0)
for i in a:
	if i < 0:
		n += 1
		ne.append(i)
	else:
		po.append(i)
	if i == 0:
		z += 1
if n % 2 != 0 and 0 not in po:
	print(abs(sum(ne)) - len(ne) + sum(po) - len(po) + 2)
elif n % 2 != 0 and 0 in po:
	print(abs(sum(ne)) - len(ne) + sum(po) - (len(po) - z) + z)
else:
	print(abs(sum(ne)) - len(ne) + (sum(po) - len(po) + z * 2))


n = int(input())
a = list(map(int, input().split()))
has_zero = 0
ans = 0
cnt = 0
for x in a:
	if x > 0:
		ans += x - 1
	elif x < 0:
		ans += -1 - x
		cnt += 1
	else:
		ans += 1
		cnt += 1
		has_zero = 1
if cnt % 2 == 1 and has_zero == 0:
	ans += 2
print(ans)


import sys
try:
	sys.stdin = open('input.txt', 'r')
	sys.stdout = open('output.txt', 'w')
except:
	pass
for _ in range(1):
	n = int(input())
	l = list(map(int, input().split()))
	par = 0
	flag = 0
	cost = 0
	for i in range(n):
		if l[i] < 0:
			par += 1
			cost += -l[i] - 1
		elif l[i] == 0:
			cost += 1
			flag = 1
		else:
			cost += l[i] - 1
	if par % 2 == 1:
		if flag == 0:
			cost += 2
	print(cost)


n = int(input())
a = [*map(int, input().split())]
k = 0
m = 0
u = 0
for i in range(n):
	if a[i] == 0:
		k += 1
		m += 1
	elif a[i] < 0:
		k += abs(a[i]) - 1
		m += 1
		u += 1
	elif a[i] > 0:
		k += a[i] - 1
if u % 2 != 0 and 0 not in a:
	print(k + 2)
else:
	print(k)


N = int(input())
a = [int(i) for i in input().split(' ')]
cost = neg = 0
zero = False
for i in range(N):
	if a[i] > 0:
		cost = cost + a[i] - 1
	elif a[i] < 0:
		cost = cost - a[i] - 1
		neg = neg + 1
	elif a[i] == 0:
		cost = cost + 1
		zero = True
if zero or neg % 2 == 0:
	print(cost)
else:
	print(cost + 2)


n = int(input())
numbers = list(map(int, input().strip().split()))
coin = 0
check = 1
count = 0
for i in range(n):
	val = numbers[i]
	if val >= 0:
		check = check and val
		coin += abs(val - 1)
	else:
		coin += -1 - val
		count = (count + 1) % 2
print([coin, coin + 2][check and count])


def iinput():
	return [int(i) for i in input().split()]
n = int(input())
mas = iinput()
count_one = 0
count_minus = 0
count_zeroes = 0
ans = 0
for i in mas:
	if i == 0:
		count_zeroes += 1
	elif i > 0:
		ans += i - 1
		count_one += 1
	else:
		ans += -1 - i
		count_minus += 1
if count_minus % 2 and (not count_zeroes):
	ans += 2
ans += count_zeroes
print(ans)


n = int(input())
a = [int(x) for x in input().split()]
dpneg = [-1 for i in range(n)]
dppos = [-1 for i in range(n)]
dpneg[0] = abs(-1 - a[0])
dppos[0] = abs(1 - a[0])
for i in range(1, n):
	dppos[i] = min(dppos[i - 1] + abs(1 - a[i]), dpneg[i - 1] + abs(-1 - a[i]))
	dpneg[i] = min(dppos[i - 1] + abs(-1 - a[i]), dpneg[i - 1] + abs(1 - a[i]))
print(dppos[-1])


n = int(input())
l = str(input()).split(' ')
s = 0
odd = 0
nz = 0
for i in range(len(l)):
	if int(l[i]) < 0:
		odd += 1
		s += abs(-1 - int(l[i]))
	elif int(l[i]) > 0:
		s += int(l[i]) - 1
	else:
		nz += 1
if odd % 2 != 0:
	if '0' in l:
		print(s + 1 * nz)
	else:
		print(s + 2)
elif '0' in l:
	print(s + 1 * nz)
else:
	print(s)


n = int(input())
a = list(map(int, input().split()))
cost = 0
negcount = 0
zerocount = 0
for i in range(len(a)):
	if a[i] > 1:
		cost += a[i] - 1
		a[i] = 1
	elif a[i] < -1:
		cost += -1 * (a[i] + 1)
		a[i] = -1
	if a[i] == -1:
		negcount += 1
	elif a[i] == 0:
		zerocount += 1
if negcount % 2 == 1:
	if not zerocount == 0:
		cost += zerocount
	else:
		cost += 2
else:
	cost += zerocount
print(cost)


n = int(input())
a = list(map(int, input().split()))
c = 0
b = []
for i in a:
	b.append(min(abs(i - 1), abs(i + 1)))
	if b[-1] == abs(i + 1):
		c += 1
if 0 in a:
	print(sum(b))
elif c % 2:
	print(sum(b) + 2)
else:
	print(sum(b))


def nextInt():
	return int(input())

def nextInts():
	return map(int, input().split())
n = nextInt()
a = nextInts()
prod = 1
ans = 0
zero = 0
for i in a:
	if i < 0:
		prod *= -1
		ans += -i - 1
	elif i > 0:
		ans += i - 1
	else:
		zero += 1
if zero == 0:
	if prod == -1:
		ans += 2
else:
	ans += zero
print(ans)


import os
import sys
from io import BytesIO, IOBase
BUFSIZE = 8192

class FastIO(IOBase):
	newlines = 0

	def __init__(self, file):
		self._fd = file.fileno()
		self.buffer = BytesIO()
		self.writable = 'x' in file.mode or 'r' not in file.mode
		self.write = self.buffer.write if self.writable else None

	def read(self):
		while True:
			b = os.read(self._fd, max(os.fstat(self._fd).st_size, BUFSIZE))
			if not b:
				break
			ptr = self.buffer.tell()
			(self.buffer.seek(0, 2), self.buffer.write(b), self.buffer.seek(ptr))
		self.newlines = 0
		return self.buffer.read()

	def readline(self):
		while self.newlines == 0:
			b = os.read(self._fd, max(os.fstat(self._fd).st_size, BUFSIZE))
			self.newlines = b.count(b'\n') + (not b)
			ptr = self.buffer.tell()
			(self.buffer.seek(0, 2), self.buffer.write(b), self.buffer.seek(ptr))
		self.newlines -= 1
		return self.buffer.readline()

	def flush(self):
		if self.writable:
			os.write(self._fd, self.buffer.getvalue())
			(self.buffer.truncate(0), self.buffer.seek(0))

class IOWrapper(IOBase):

	def __init__(self, file):
		self.buffer = FastIO(file)
		self.flush = self.buffer.flush
		self.writable = self.buffer.writable
		self.write = lambda s: self.buffer.write(s.encode('ascii'))
		self.read = lambda : self.buffer.read().decode('ascii')
		self.readline = lambda : self.buffer.readline().decode('ascii')
(sys.stdin, sys.stdout) = (IOWrapper(sys.stdin), IOWrapper(sys.stdout))
input = lambda : sys.stdin.readline().rstrip('\r\n')
n = int(input())
vals = list(map(int, input().split()))
cost = 0
prod = 1
zer = 0
for s in range(n):
	if vals[s] == 0:
		zer += 1
	elif vals[s] > 0:
		cost += vals[s] - 1
		vals[s] = 1
	else:
		cost += -1 - vals[s]
		vals[s] = -1
	prod *= vals[s]
if zer > 0:
	print(cost + zer)
elif prod == 1:
	print(cost)
else:
	print(cost + 2)


n = int(input())
a = list(map(int, input().split(' ')))
cn = 0
cz = 0
res = 0
for x in a:
	if x == 0:
		res += 1
		cz += 1
	elif x > 0:
		res += x - 1
	else:
		res -= x + 1
		cn += 1
if cn % 2 == 1 and cz == 0:
	res += 2
print(res)


n = int(input())
a = list(map(int, input().split()))
ans = []
c = d = 0
for i in range(n):
	if a[i] > 0:
		ans.append(a[i] - 1)
	elif a[i] < 0:
		ans.append(-1 - a[i])
		c += 1
	else:
		ans.append(0)
		d += 1
if c % 2 == 0:
	print(sum(ans) + d)
elif d > 0:
	print(sum(ans) + d)
else:
	print(sum(ans) + 2)


n = int(input())
arr = list(map(int, input().split()))
count = 0
pos = 0
neg = 0
zer = 0
for i in range(n):
	if arr[i] > 1:
		count += arr[i] - 1
		arr[i] = 1
		pos += 1
	elif arr[i] == 1:
		pos += 1
		continue
	elif arr[i] < -1:
		count += -1 - arr[i]
		arr[i] = -1
		neg += 1
	elif arr[i] == -1:
		neg += 1
	else:
		count += 1
		zer += 1
if neg % 2 == 0:
	print(count)
elif zer >= 1:
	print(count)
else:
	print(count + 2)


n = int(input())
arr = list(map(int, input().split()))
count = 0
c = 0
d = 0
hi = False
for num in arr:
	if num >= 1:
		c += 1
		count += abs(num - 1)
	elif num == 0:
		hi = True
		count += 1
	else:
		d += 1
		count += -1 - num
if hi == True:
	print(count)
elif d % 2 == 0:
	print(count)
else:
	print(count + 2)


n = int(input())
l = [int(j) for j in input().split()]
t = 0
suma = 0
nul = 0
for i in range(n):
	if l[i] < 0:
		suma += abs(-1 - l[i])
		t += 1
	elif l[i] == 0:
		nul += 1
	else:
		suma += abs(l[i] - 1)
if t % 2 == 0:
	print(suma + nul)
elif nul:
	print(suma + nul)
else:
	print(suma + 2)


n = int(input())
seq = list(map(int, input().split()))
count_zeros = 0
n_count = 0
total = 0
for i in range(n):
	if seq[i] < 0:
		n_count += 1
		if n_count == 2:
			total += -seq[i] - 3
			n_count = 0
		else:
			total += -seq[i] + 1
	elif seq[i] == 0:
		total += 1
		count_zeros += 1
	else:
		total += seq[i] - 1
if n_count == 1 and count_zeros:
	total -= 2
print(total)


n = int(input())
arr = list(map(int, input().split()))
ans = 0
num = 0
zero = False
for i in range(n):
	if arr[i] < 0:
		ans += -1 - arr[i]
		num += 1
	elif arr[i] > 0:
		ans += arr[i] - 1
	else:
		ans += 1
		zero = True
if num % 2 == 0 or zero:
	print(ans)
else:
	print(ans + 2)


a = int(input())
b = list(map(int, input().split()))
b.sort()
c = 0
p = 0
for i in range(len(b)):
	if b[i] > 0:
		c = c + (b[i] - 1)
	if b[i] < 0:
		c = c + (abs(b[i]) - 1)
		p = p + 1
	if b[i] == 0:
		c = c + 1
if p % 2 != 0:
	if 0 in b:
		print(c)
	else:
		print(c + 2)
else:
	print(c)


n = int(input())
l1 = [int(x) for x in input().split()]
ans = 0
negs = 0
for x in l1:
	if x < 0:
		negs += 1
for x in l1:
	if x < -1:
		ans += abs(x + 1)
	elif x > 1:
		ans += abs(x - 1)
	elif x == 0:
		negs = 0
		ans += 1
if negs % 2:
	ans += 2
print(ans)


n = int(input())
a = input().split()
ans = 0
count = {-1: 0, 1: 0, 0: 0}
for i in range(0, n):
	x = int(a[i])
	if x == -1:
		count[-1] += 1
	elif x == 1:
		count[1] += 1
	elif x == 0:
		count[0] += 1
	elif x > 0:
		ans += x - 1
		count[1] += 1
	elif x < 0:
		ans += -1 - x
		count[-1] += 1
if count[-1] % 2 == 1:
	if count[0] == 0:
		ans += 2
ans += count[0]
print(ans)


n = int(input())
num = [int(x) for x in input().split()]
num1 = num[:]
numplus = []
numminus = []
ans = 0
a = 0
for i in range(n):
	if num[i] > 1:
		a = num[i] - 1
		ans += a
		num[i] = 1
	elif num[i] < -1:
		a = -num[i] - 1
		ans += a
		num[i] = -1
one = 1
for k in range(n):
	one = one * num[k]
if one == 1:
	print(ans)
elif one == 0:
	s = num1.count(0)
	print(ans + s)
elif one == -1:
	ans = ans + 2
	print(ans)


n = int(input())
l = list(map(int, input().split()))
x = 0
z = 0
for i in l:
	if i < 0:
		z += 1
	x += abs(abs(i) - 1)
if z & 1 == 1:
	if 0 not in set(l):
		x += 2
print(x)


n = int(input())
an = map(int, input().split())
neg = []
pos = []
zero = 0
for e in an:
	if e < 0:
		neg.append(e)
	elif e > 0:
		pos.append(e)
	else:
		zero += 1
s = sum(pos) - sum(neg) - n + 2 * zero
if len(neg) % 2 == 1:
	if zero == 0:
		s += 2
print(s)


n = input()
l = list(map(int, input().split()))
neg = []
pos = []
cnt = 0
flag = False
for i in l:
	if i < 0:
		neg.append(i)
	else:
		pos.append(i)
if len(neg) % 2 != 0:
	if pos.count(0) != 0:
		cnt += 1
		maxx = max(neg)
		neg.remove(maxx)
		cnt += abs(maxx) - 1
		flag = True
	else:
		maxx = max(neg)
		neg.remove(maxx)
		cnt += abs(maxx) + 1
for i in neg:
	if i != -1:
		cnt += abs(i + 1)
if flag:
	pos.remove(0)
for i in pos:
	if i == 0:
		cnt += 1
	else:
		cnt += i - 1
print(cnt)


class Solution(object):

	def __init__(self):
		pass

	def sol(self, a: []) -> int:
		sl = 0
		p = 0
		n = 0
		z = 0
		for i in range(0, len(a)):
			nm = a[i]
			if nm == 0:
				z += 1
				continue
			if nm == 1:
				p += 1
				continue
			if nm == -1:
				n += 1
				continue
			if nm < -1:
				n += 1
				a[i] = -1
			elif nm > 1:
				p += 1
				a[i] = 1
			sl += abs(nm) - 1
		if n % 2 == 1 and z > 0:
			sl += 1
			z -= 1
			n -= 1
		sl += 2 * (n % 2) + z
		return sl

def main():
	n = input()
	a = [int(e) for e in input().split()]
	sol = Solution()
	print(sol.sol(a))
	return 0
main()


x = int(input())
s = [int(i) for i in input().split()]
ans = 0
for i in range(x):
	if s[i] not in [-1, 0, 1]:
		if s[i] > 1:
			ans += s[i] - 1
			s[i] = 1
		else:
			ans += -s[i] - 1
			s[i] = -1
s = sorted([i for i in s if i != 1])
if s.count(-1) % 2 == 0:
	print(ans + s.count(0))
elif s.count(0) > 0:
	print(ans + s.count(0))
else:
	print(ans + 2)


input()
A = list(map(int, input().split()))
x = 0
y = 0
z = 0
q = 0
for a in A:
	if a < -1:
		q += -1 - a
		y += 1
	elif a == -1:
		y += 1
	elif a == 0:
		z += 1
	elif a == 1:
		x += 1
	else:
		q += a - 1
		x += 1
if y % 2 == 1 and (not z):
	q += 2
else:
	z -= 1
	q += 1
q += z
print(q)


s = 0
n = 0
z = 0
t = int(input())
l = [int(i) for i in input().split()]
for i in l:
	if i == 0:
		z += 1
	if i < 0:
		s += abs(i) - 1
		n += 1
	if i > 0:
		s += abs(i - 1)
if z == 0:
	if n % 2 == 0:
		print(s)
	else:
		print(s + 2)
else:
	print(s + z)


n = int(input())
a = [int(i) for i in input().split()]
zero = 0
cnt = 0
sign = 1
for item in a:
	if item == 0:
		zero = 1
	elif item < 0:
		sign *= -1
	cnt += abs(abs(item) - 1)
if not zero and sign < 0:
	cnt += 2
print(cnt)


n = int(input())
arr = list(map(int, input().split()))
count_of_negatives = 0
count_of_zeros = 0
result = 0
for (ind, el) in enumerate(arr):
	if el < 0:
		count_of_negatives += 1
	if el == 0:
		count_of_zeros += 1
	result += abs(abs(el) - 1) if el != 0 else 0
if count_of_zeros > 0:
	result += count_of_zeros
elif count_of_negatives & 1 == 1:
	result += 2
print(result)


n = int(input())
a = list(map(int, input().split()))
d = 0
negative = 0
zero = 0
if len(a) == 1:
	if a[0] <= 0:
		d += abs(a[0]) + 1
	else:
		d += a[0] - 1
else:
	for i in a:
		if i < 0:
			d += abs(i + 1)
			negative += 1
		elif i > 0:
			d += i - 1
		elif i == 0:
			zero += 1
	if (negative + zero) % 2 == 0:
		d += zero
	elif zero >= 1:
		d += zero
	else:
		d += 2
print(d)


def ii():
	return int(input())

def lmii():
	return list(map(int, input().split()))
size = ii()
array = lmii()
ans0 = array.count(0)
pos = []
neg = []
for i in range(size):
	if array[i] > 0:
		pos.append(array[i])
	elif array[i] < 0:
		neg.append(array[i])
posans = 0
for j in range(len(pos)):
	if pos[j] == 1:
		continue
	else:
		posans = posans + pos[j] - 1
negans = 0
for k in range(len(neg)):
	if neg[k] == -1:
		continue
	else:
		negans = negans + (-1 * neg[k] - 1)
if len(neg) % 2 != 0:
	if ans0 > 0:
		print(posans + negans + ans0)
	else:
		print(ans0 + posans + negans + 2)
else:
	print(ans0 + posans + negans)


n = int(input())
l = list(map(int, input().split()))
sum = 0

def negative(l):
	sum = 0
	for i in l:
		if i < 0:
			sum = sum + 1
	return sum
count = negative(l)
count0 = l.count(0)
for i in l:
	if i > 0:
		sum = sum + (i - 1)
if count0 == 0:
	for i in l:
		if i < 0:
			sum = sum + abs(i) - 1
	if count % 2 == 0:
		sum = sum
	else:
		sum = sum + 2
else:
	for i in l:
		if i <= 0:
			sum = sum + abs(abs(i) - 1)
print(sum)


n = int(input())
a = list(map(int, input().split()))
cnt = 0
pro = 1
for i in range(n):
	if a[i] > 0:
		cnt += a[i] - 1
	elif a[i] < 0:
		cnt += -a[i] - 1
		pro *= -1
	else:
		cnt += 1
		pro = 0
if pro == -1:
	cnt += 2
print(cnt)


t = int(input())
lst = list(map(int, input().split()))
p = n = z = 0
ans = 0
for c in lst:
	if c > 0:
		p += 1
		ans += abs(c) - 1
	elif c == 0:
		z += 1
	else:
		n += 1
		ans += abs(c) - 1
if n > z and n % 2 != 0 and (z == 0):
	ans += 2
else:
	ans += z
print(ans)


n = int(input())
A = list(map(int, input().split()))
coin = 0
odd = 0
z = 0
for i in range(0, n):
	o = A[i]
	if o < -1:
		co = abs(o + 1)
		coin = coin + co
		o = -1
	elif o > 1:
		co = abs(o - 1)
		coin = coin + co
		o = 1
	elif o == 0:
		coin += 1
		z += 1
	elif o == 1 or o == -1:
		continue
	A[i] = o
for p in A:
	if p == -1:
		odd += 1
if odd % 2 != 0 and z > 0:
	pass
elif odd % 2 != 0 and z == 0:
	coin = coin + 2
print(coin)


n = int(input())
a = list(map(int, input().rstrip().split()))
nc = len(list(filter(lambda x: x < 0, a)))
pc = len(list(filter(lambda x: x > 0, a)))
zc = a.count(0)
s = 0
for i in range(n):
	s += abs(abs(a[i]) - 1)
if nc % 2 == 1 and zc == 0:
	print(s + 2)
else:
	print(s)


t = int(input())
l = list(map(int, input().split()))
mi = min(l)
ma = max(l)
sum = 0
ne = 0
go = 0
k = 0
for i in range(0, len(l), 1):
	if l[i] > 0:
		sum += l[i] - 1
		go += 1
	elif l[i] < 0:
		sum += -l[i] - 1
		ne += 1
	else:
		sum += 1
		k += 1
if ne % 2:
	if k:
		print(sum)
	else:
		print(sum + 2)
else:
	print(sum)


def negatives(arr):
	return len([i for i in arr if i < 0])

def zeros(arr):
	return len([i for i in arr if i == 0])

def moves_to_make_one(arr):
	return sum([abs(i - 1) for i in arr])

def minimumMoves(all_moves, negatives, zeros):
	if negatives % 2 != 0:
		if zeros <= 0:
			return all_moves - 2 * negatives + 2
	return all_moves - 2 * negatives
size = int(input())
arr = list(map(int, input().split()))
print(minimumMoves(moves_to_make_one(arr), negatives(arr), zeros(arr)))


n = int(input())
x = input().split()
s = 0
g = 0
man = 0
for i in x:
	if int(i) > 0 and int(i) != 1:
		g = g + (int(i) - 1)
	elif int(i) < 0 and int(i) != -1:
		g = g + (-1 - int(i))
		man += 1
	elif int(i) == 0:
		s += 1
	elif int(i) == -1:
		man += 1
if s == 0:
	if man % 2 == 0:
		print(g)
	else:
		print(g + 2)
else:
	print(g + s)


listLen = int(input())
factors = [int(k) for k in input().split()]
(negCount, currFactor, ind, cost) = (0, 0, 0, 0)
zeroFound = False
while ind < listLen:
	currFactor = factors[ind]
	if currFactor == 0:
		zeroFound = True
		cost += 1
	elif currFactor > 0:
		cost += currFactor - 1
	else:
		cost += abs(currFactor) - 1
		negCount += 1
	ind += 1
if negCount % 2 == 0 or zeroFound:
	print(cost)
else:
	print(cost + 2)


from sys import stdin

def main():
	tam = int(stdin.readline().strip())
	l = list(map(int, stdin.readline().split()))
	l.sort()
	cnt = 0
	i = 0
	band = False
	while i < tam:
		if i + 1 < tam and l[i] != 0 and (l[i + 1] == 0):
			cnt += (l[i] + 1 + (l[i + 1] - 1)) * -1
			i += 2
		elif i + 1 < tam and l[i + 1] < 0:
			cnt += (l[i] + 1 + (l[i + 1] + 1)) * -1
			i += 2
		elif l[i] <= 0:
			cnt += (l[i] - 1) * -1
			i += 1
		else:
			cnt += l[i] - 1
			i += 1
	print(cnt)
main()


n = int(input())
a = list(map(int, input().split()))
cnt = cnt1 = 0
z1 = 0
for i in range(len(a)):
	if a[i] < 0:
		cnt += abs(a[i]) - 1
		cnt1 = cnt1 + 1
		a[i] = -1
	elif a[i] > 0:
		cnt += abs(a[i]) - 1
		a[i] = 1
	elif a[i] == 0:
		cnt += 1
		z1 = 1
if cnt1 % 2 != 0 and z1 == 0:
	cnt = cnt + 2
print(abs(cnt))


n = int(input())
a = list(map(int, input().split()))
count = 0
count2 = 0
for i in range(n):
	if a[i] == 1 or a[i] == -1:
		count += 0
	elif a[i] == 0:
		count2 += 1
	else:
		p = min(abs(a[i] - 1), abs(a[i] + 1))
		count += p
		if p == abs(a[i] - 1):
			a[i] = 1
		else:
			a[i] = -1
c1 = a.count(1)
cn1 = a.count(-1)
if cn1 % 2 == 0:
	print(count + count2)
elif cn1 % 2 != 0 and count2 > 0:
	print(count + count2)
else:
	print(count + 2)


n = int(input())
A = list(map(int, input().split(' ')))
count = 0
check = 0
zero = 0
for i in A:
	if i < 0:
		count += abs(i + 1)
		check += 1
	elif i > 0:
		count += abs(i - 1)
	else:
		zero += 1
		count += 1
if check % 2 != 0:
	if zero == 0:
		count += 2
print(count)


n = int(input())
r = lambda : map(int, input().split())
a = [*r()]
c = 0
count = 0
for i in range(0, n):
	if a[i] < 0:
		c += 1
	if a[i] < 0 and a[i] != -1:
		count += abs(a[i] + 1)
	elif a[i] == 0:
		count += 1
	elif a[i] > 0 and a[i] != 1:
		count += a[i] - 1
if c % 2 != 0 and 0 not in a:
	if c != 1:
		v = c // 2
		v = v * 2
		c = c - v
	print(abs(count + c * 2))
else:
	print(count)


n = int(input())
a = list(map(int, input().split()))
a.sort()
ans = 0
z = 0
c = 0
for i in range(len(a)):
	if a[i] > 0:
		c
		ans += a[i] - 1
	elif a[i] == 0:
		z += 1
	else:
		c += 1
		ans += abs(a[i]) - 1
if c % 2 != 0:
	if z > 0:
		ans += 1
		z -= 1
	else:
		ans += 2
ans += z
print(ans)


N = int(input())
A = list(map(int, input().split()))
ans = 0
nega = 0
zero = 0
for i in A:
	if i < 0:
		nega += 1
	if i == 0:
		zero = 1
	ans += abs(abs(i) - 1)
if zero == 0 and nega % 2 == 1:
	ans += 2
print(ans)


a = int(input())
x = [int(x) for x in input().split()]
m = 1
c = 0
l = []
for i in x:
	if i == 1:
		m = m * 1
	elif i == -1:
		m = m * -1
	elif i > 1:
		c = i - 1 + c
	elif i < -1:
		c = i * -1 - 1 + c
		m = m * -1
	elif i == 0:
		l.append(i)
if m == -1:
	if len(l) == 0:
		print(c + 2)
	else:
		print(c + len(l))
else:
	print(c + len(l))


kk = int(input())
n = 0
a = []
s = input()
k = s.split(' ')
positive_max = 0
negative_min = 0
have_zero = False
for f in range(len(k)):
	a.append(int(k[f]))
	if a[f] < 0:
		n += 1
	elif a[f] == 0:
		have_zero = True
sum = 0
if n % 2 == 0:
	for i in range(kk):
		if a[i] < 0:
			sum += abs(-1 - a[i])
		else:
			sum += abs(a[i] - 1)
elif not have_zero:
	for i in range(kk):
		if a[i] < 0:
			sum += abs(-1 - a[i])
		else:
			sum += abs(a[i] - 1)
	sum += 2
else:
	for i in range(kk):
		if a[i] < 0:
			sum += abs(-1 - a[i])
		else:
			sum += abs(a[i] - 1)
print(sum)


n = int(input().strip())
a = list(map(int, input().strip().split(' ')))
(ans, negCnt, zero) = (0, 0, False)
for x in a:
	if x < 0:
		negCnt += 1
		ans += -1 - x
	else:
		ans += abs(x - 1)
		if x == 0:
			zero = True
if not zero and negCnt % 2 == 1:
	ans += 2
print(ans)


n = int(input())
a = list(map(int, input().split()))
ans = 0
flag = True
for i in range(n):
	if a[i] != 0:
		ans += abs(a[i]) - 1
		a[i] /= abs(a[i])
	else:
		a[i] = 1
		ans += 1
		flag = False
if flag and a.count(-1) % 2 != 0:
	ans += 2
print(ans)


_ = int(input())
ans = 0
(n, p, z) = (0, 0, 0)
for el in map(int, input().split()):
	if el < -1:
		ans += -1 - el
		n += 1
	elif el > 1:
		ans += el - 1
		p += 1
	elif el == 0:
		ans += 1
		z += 1
	elif el == -1:
		n += 1
if n % 2 != 0:
	if z == 0:
		ans += 2
print(ans)


n = int(input())
a = list(map(int, input().split()))
neg = []
pos = []
for aa in a:
	if abs(1 - aa) < abs(-1 - aa):
		pos.append(aa)
	else:
		neg.append(aa)
ans = 0
if len(neg) % 2 != 0:
	if len(pos) == 0:
		d = 0
		cost = 10 ** 9 + 1
		for aa in neg:
			if cost > abs(1 - aa) - abs(-1 - aa):
				cost = abs(1 - aa) - abs(-1 - aa)
				d = aa
		ans += sum([abs(-1 - x) for x in neg])
		ans -= abs(-1 - d)
		ans += abs(1 - d)
	else:
		d1 = 0
		cost1 = 10 ** 9 + 1
		for aa in neg:
			if cost1 > abs(1 - aa) - abs(-1 - aa):
				cost1 = abs(1 - aa) - abs(-1 - aa)
				d1 = aa
		d2 = 0
		cost2 = 10 ** 9 + 1
		for aa in pos:
			if cost2 > abs(-1 - aa) - abs(1 - aa):
				cost2 = abs(-1 - aa) - abs(1 - aa)
				d2 = aa
		ans += sum([abs(1 - x) for x in pos])
		ans += sum([abs(-1 - x) for x in neg])
		if cost1 < cost2:
			ans -= abs(-1 - d1)
			ans += abs(1 - d1)
		else:
			ans -= abs(1 - d2)
			ans += abs(-1 - d2)
else:
	ans += sum([abs(1 - x) for x in pos])
	ans += sum([abs(-1 - x) for x in neg])
print(ans)


n = int(input())
l = list(map(int, input().split()))
negatives = 0
zeros = l.count(0)
coins = 0
for i in range(n):
	if l[i] <= -1:
		negatives += 1
		coins += -1 - l[i]
	elif l[i] > 1:
		coins += l[i] - 1
if negatives % 2 != 0 and zeros == 0:
	coins += 2
else:
	coins += zeros
print(coins)


from sys import stdin
n = int(stdin.readline().strip())
s = list(map(int, stdin.readline().strip().split()))
dp = [[10 ** 15, 10 ** 15] for i in range(n)]
dp[0][0] = abs(s[0] - 1)
dp[0][1] = abs(s[0] - -1)
for i in range(1, n):
	un = abs(s[i] - 1)
	mun = abs(s[i] - -1)
	dp[i][0] = min(dp[i - 1][0] + un, dp[i - 1][1] + mun)
	dp[i][1] = min(dp[i - 1][1] + un, dp[i - 1][0] + mun)
print(dp[-1][0])


from __future__ import division, print_function
from sys import stdin, stdout
import itertools, os, sys, threading
from collections import deque, Counter, OrderedDict, defaultdict
import heapq
from math import ceil, floor, log, sqrt, factorial, pow, pi, gcd
from fractions import Fraction

def ii():
	return int(input())

def si():
	return str(input())

def mi():
	return map(int, input().split())

def li():
	return list(mi())

def fii():
	return int(stdin.readline())

def fsi():
	return str(stdin.readline())

def fmi():
	return map(int, stdin.readline().split())

def fli():
	return list(fmi())
abc = 'abcdefghijklmnopqrstuvwxyz'
abd = {'a': 0, 'b': 1, 'c': 2, 'd': 3, 'e': 4, 'f': 5, 'g': 6, 'h': 7, 'i': 8, 'j': 9, 'k': 10, 'l': 11, 'm': 12, 'n': 13, 'o': 14, 'p': 15, 'q': 16, 'r': 17, 's': 18, 't': 19, 'u': 20, 'v': 21, 'w': 22, 'x': 23, 'y': 24, 'z': 25}
mod = 1000000007
(dx, dy) = ([-1, 1, 0, 0], [0, 0, 1, -1])

def getKey(item):
	return item[0]

def sort2(l):
	return sorted(l, key=getKey)

def d2(n, m, num):
	return [[num for x in range(m)] for y in range(n)]

def isPowerOfTwo(x):
	return x and (not x & x - 1)

def decimalToBinary(n):
	return bin(n).replace('0b', '')

def ntl(n):
	return [int(i) for i in str(n)]

def powerMod(x, y, p):
	res = 1
	x %= p
	while y > 0:
		if y & 1:
			res = res * x % p
		y = y >> 1
		x = x * x % p
	return res

def gcd(x, y):
	while y:
		(x, y) = (y, x % y)
	return x
graph = defaultdict(list)
visited = [0] * 1000000
col = [-1] * 1000000

def dfs(v, c):
	if visited[v]:
		if col[v] != c:
			print('-1')
			exit()
		return
	col[v] = c
	visited[v] = 1
	for i in graph[v]:
		dfs(i, c ^ 1)

def bfs(d, v):
	q = []
	q.append(v)
	visited[v] = 1
	while len(q) != 0:
		x = q[0]
		q.pop(0)
		for i in d[x]:
			if visited[i] != 1:
				visited[i] = 1
				q.append(i)
		print(x)

def make_graph(e):
	d = {}
	for i in range(e):
		(x, y) = mi()
		if x not in d.keys():
			d[x] = [y]
		else:
			d[x].append(y)
		if y not in d.keys():
			d[y] = [x]
		else:
			d[y].append(x)
	return d

def gr2(n):
	d = {}
	for i in range(n):
		(x, y) = mi()
		if x not in d.keys():
			d[x] = [y]
		else:
			d[x].append(y)
	return d

def connected_components(graph):
	seen = set()

	def dfs(v):
		vs = set([v])
		component = []
		while vs:
			v = vs.pop()
			seen.add(v)
			vs |= set(graph[v]) - seen
			component.append(v)
		return component
	ans = []
	for v in graph:
		if v not in seen:
			d = dfs(v)
			ans.append(d)
	return ans

def primeFactors(n):
	s = set()
	while n % 2 == 0:
		s.add(2)
		n = n // 2
	for i in range(3, int(sqrt(n)) + 1, 2):
		while n % i == 0:
			s.add(i)
			n = n // i
	if n > 2:
		s.add(n)
	return s

def find_all(a_str, sub):
	start = 0
	while True:
		start = a_str.find(sub, start)
		if start == -1:
			return
		yield start
		start += len(sub)
n = ii()
l = li()
(cn, cp, c0) = (0, 0, 0)
ln = []
lp = []
count = 0
for i in range(n):
	if l[i] > 0:
		cp += 1
		count += l[i] - 1
	if l[i] == 0:
		c0 += 1
	if l[i] < 0:
		cn += 1
		count += abs(l[i] + 1)
if cn % 2 == 1:
	if c0 > 0:
		count += 1
		c0 -= 1
	else:
		count += 2
count += c0
print(count)


n = int(input())
a = list(map(int, input().split()))
(lo, s, z) = (0, 0, 0)
for i in a:
	if i != 0:
		s += abs(i) - 1
		if i < 0:
			lo += 1
	else:
		z += 1
if z > 0:
	s += z
elif lo % 2 != 0:
	s += 2
print(s)


n = int(input())
arr = list(map(int, input().split()))
ans = 0
(c1, c2) = (0, 0)
for i in range(n):
	if arr[i] > 1:
		ans += arr[i] - 1
	if arr[i] < -1:
		ans += abs(arr[i]) - 1
		c1 -= 1
	if arr[i] == -1:
		c1 -= 1
	if arr[i] == 0:
		c2 += 1
if c1 % 2 == 0:
	print(ans + c2)
elif c2 > 0:
	print(ans + c2)
else:
	print(ans + 2)


N = int(input())
a = list(map(int, input().split()))
x = 0
y = 0
cost = 0
cnt = 0
for i in range(N):
	if a[i] <= -1:
		cost += abs(a[i]) - 1
		x += 1
	elif a[i] >= 1:
		cost += a[i] - 1
		y += 1
	elif a[i] == 0:
		cost += 1
		cnt += 1
if x % 2 == 0:
	print(cost)
elif x % 2 == 1 and cnt >= 1:
	print(cost)
elif x % 2 == 1 and cnt == 0:
	print(cost + 2)
else:
	print(cost)


import sys
input = sys.stdin.readline

def inp():
	return int(input())

def inlt():
	return list(map(int, input().split()))

def solve(n, arr):
	dp = [[0, 0]] * n
	dp[-1] = [abs(arr[-1] + 1), abs(arr[-1] - 1)]
	dp[0] = [abs(arr[0] + 1), abs(arr[0] - 1)]
	for i in range(n - 2, 0, -1):
		neg_count = abs(arr[i] + 1)
		pos_count = abs(arr[i] - 1)
		neg_min = min(neg_count + dp[i + 1][1], pos_count + dp[i + 1][0])
		pos_min = min(neg_count + dp[i + 1][0], pos_count + dp[i + 1][1])
		dp[i] = [neg_min, pos_min]
	return min(dp[0][0] + dp[1][0], dp[0][1] + dp[1][1])
n = inp()
arr = inlt()
if n == 1:
	print(abs(arr[-1] - 1))
else:
	print(solve(n, arr))


x = int(input())
y = input()
z = y.split()
a = [int(d) for d in z]
pos = []
neg = []
zero = []
ans = 0
for num in a:
	if num > 0:
		pos.append(num)
	elif num < 0:
		neg.append(num)
	else:
		zero.append(num)
for num in pos:
	ans = ans + (num - 1)
for num in neg:
	ans = ans - (num + 1)
if len(neg) % 2 == 0:
	ans = ans + len(zero)
else:
	if len(zero) != 0:
		ans = ans + len(zero)
	if len(zero) == 0:
		ans = ans + 2
print(ans)


n = int(input())
a = list(map(int, input().split()))
ans = 0
negative_cnt = 0
zero_found = False
for x in a:
	if x < 0:
		negative_cnt += 1
		ans += -1 - x
	elif x == 0:
		zero_found = True
		ans += 1
	else:
		ans += x - 1
if not zero_found and negative_cnt % 2 == 1:
	ans += 2
print(ans)


def solve(arr):
	minus = 0
	zeros = 0
	ans = 0
	for i in arr:
		if i == 0:
			zeros += 1
			continue
		if i < 0:
			minus += 1
		ans += abs(i) - 1
	if minus & 1:
		if zeros > 0:
			zeros -= 1
			ans += 1
		else:
			ans += 2
	if zeros:
		ans += zeros
	print(ans)
n = int(input())
arr = map(int, input().split())
solve(arr)


(k, h) = (int(input()), list(map(int, input().split())))
g = len(list(filter(lambda x: x < 0, h)))
print(sum([abs(i + [1, -1][i > 0]) for i in h]) + [0, 2][0 not in h and g % 2])


import sys
import re
from collections import deque, Counter, OrderedDict, defaultdict
from heapq import nsmallest, nlargest, heapify, heappop, heappush, heapreplace
from bisect import bisect_left, bisect_right

def dfs(curr, parent):
	visited[curr] = True
	value[curr] += value[parent]
	for i in mydict[curr]:
		if not visited[i]:
			dfs(i, curr)

def get_array():
	return list(map(int, sys.stdin.readline().strip().split()))

def get_ints():
	return map(int, sys.stdin.readline().strip().split())

def input():
	return sys.stdin.readline().strip()
n = int(input())
Arr = get_array()
pos = 0
neg = 0
zero = 0
posA = []
negA = []
zeroA = []
for i in Arr:
	if i > 0:
		pos += 1
		posA.append(i)
	elif i == 0:
		zero += 1
		zeroA.append(i)
	else:
		neg += 1
		negA.append(i)
if neg % 2 == 0:
	total = 0
	for i in negA:
		total += -1 - i
	for i in posA:
		total += i - 1
	total += zero
else:
	total = 0
	if zero > 0:
		total += 1
		zero -= 1
		for i in negA:
			total += -1 - i
		for i in posA:
			total += i - 1
		total += zero
	elif zero == 0 and pos > 0:
		total += 2
		for i in negA:
			total += -1 - i
		for i in posA:
			total += i - 1
	elif zero == 0 and pos == 0:
		for i in negA:
			total += -1 - i
		total += 2
print(total)


n = int(input())
arr = list(map(int, input().split()))
posi = list(filter(lambda x: x > 1, arr))
zero = list(filter(lambda x: x == 0, arr))
nega = list(filter(lambda x: x < 0, arr))
ans = sum(posi) - len(posi)
if len(zero) == 0 and len(nega) % 2 == 0:
	print(ans + abs(sum(nega)) - len(nega))
elif len(zero) == 0 and len(nega) % 2 == 1:
	print(ans + abs(sum(nega)) - len(nega) + 2)
elif len(zero) > 0:
	print(ans + len(zero) + abs(sum(nega)) - len(nega))


n = int(input())
A = [int(i) for i in input().split(' ')]
A.sort()
(su, cnt) = (0, 0)
for i in range(n):
	if A[i] > 0:
		su += A[i] - 1
	elif A[i] < 0:
		su += -A[i] - 1
		cnt += 1
	else:
		if cnt % 2:
			cnt += 1
		su += 1
if cnt % 2:
	su += 2
print(su)


n = int(input())
lst = [int(i) for i in input().split()]
(neg, zer) = (0, lst.count(0))
s = 0
for i in range(n):
	if lst[i] < 0:
		neg += 1
	if not lst[i] == 0:
		s += abs(lst[i]) - 1
print(s + 2 if zer == 0 and neg % 2 == 1 else s + zer)


n = int(input())
a = list(map(int, input().split()))
ans = 0
zero = posi = nega = 0
for i in a:
	if i == 0:
		zero += 1
	elif i > 0:
		posi += 1
		ans += i - 1
	else:
		nega += 1
		ans += -1 - i
if nega & 1 and (not zero):
	ans += 2
ans += zero
print(ans)


n = int(input())
arr = list(map(int, input().split()))
cost = 0
zero = 0
count = 0
for i in range(n):
	if arr[i] != 0:
		if arr[i] < 0:
			cost += -1 - arr[i]
			count += 1
		else:
			cost += arr[i] - 1
	else:
		zero += 1
if zero > 0:
	cost += zero
if zero == 0:
	if count % 2 != 0:
		cost += 2
print(cost)


n = int(input())
a = list(map(int, input().split()))
b = [0] * n
for i in range(n):
	if a[i] < -1:
		b[i] = -1 - a[i]
	elif a[i] > 1 or a[i] == 0:
		if a[i] == 0:
			b[i] = 1 - a[i]
		else:
			b[i] = a[i] - 1
	else:
		b[i] = 0
c = a.count(0)
nc = 0
for i in range(n):
	if a[i] < 0:
		nc = nc + 1
if nc % 2 == 0:
	print(sum(b))
elif c > 0 and nc % 2 == 1:
	print(sum(b))
elif c == 0 and nc % 2 == 1:
	print(sum(b) + 2)


q = int(input())
w = list(map(int, input().split()))
k = 0
p = 0
for i in w:
	if i < 0:
		k += -1 - i
		p += 1
	elif i > 0:
		k += i - 1
if p % 2 != 0:
	if w.count(0) >= 1:
		k += w.count(0)
	else:
		k += 2
else:
	k += w.count(0)
print(k)


n = int(input())
a = [int(i) for i in input().split()]
k = 0
c = 0
z = 0
for i in a:
	if i < 0:
		c += 1
	if i == 0:
		z += 1
for i in a:
	if i > 0:
		k = k + i - 1
	if i < 0:
		k = k - i - 1
	if i == 0:
		k = k + 1
if c % 2 == 0:
	print(k)
if c % 2 != 0 and z == 0:
	print(k + 2)
if c % 2 != 0 and z != 0:
	print(k)


import bisect
n = int(input())
a = list(map(int, input().split()))
a.sort()
info = bisect.bisect_right(a, -1)
flag = True
cost = 0
temp = 1
for i in range(0, info):
	if i < info - 1:
		cost += abs(-1 - a[i])
		temp = temp * -1
	elif i == info - 1:
		if temp == -1:
			cost += abs(-1 - a[i])
			temp = temp * -1
			flag = True
		else:
			flag = False
			if len(a) > info:
				if abs(-1 - a[info]) + abs(-1 - a[info - 1]) < abs(1 - a[info]) + abs(+1 - a[info - 1]):
					cost += abs(-1 - a[info]) + abs(-1 - a[info - 1])
				else:
					cost += abs(1 - a[info]) + abs(1 - a[info - 1])
			else:
				cost += abs(1 - a[info - 1])
if flag:
	for i in range(info, n):
		cost += abs(1 - a[i])
else:
	for i in range(info + 1, n):
		cost += abs(1 - a[i])
print(cost)


import sys
import collections
import math
import functools
import itertools
import bisect
import operator
import heapq
import random
true = True
false = False
null = None
tcid = 0
tcmax = 99999999

def compute(val, func):
	return func(val)

def seq(lo, hi, step=1):
	return range(lo, hi + 1, step)

def sround(val, nd):
	return f'{val:.{nd}f}'

def ceil(a, b):
	ans = a // b
	if a % b != 0:
		ans += 1
	return ans

def perr(*args, **kwargs):
	print(*args, file=sys.stderr, **kwargs)

def line():
	ln = sys.stdin.readline().strip()
	if ln == '':
		sys.exit()
	return ln

def lines(n):
	return [line() for i in range(n)]

def split(ln=None):
	return (ln or line()).split()

def num(str=None):
	str = str or line()
	return float(str) if '.' in str else int(str)

def nums(o=None):
	if o is not None:
		if isinstance(o, int):
			o = lines(o)
		elif isinstance(o, str):
			o = split(o)
	return list(map(num, o or split()))

def mainloop(tcid=1):
	n = num()
	a = nums()
	sign = 1
	cost = 0
	zero = 0
	for aa in a:
		if aa < 0:
			sign *= -1
			cost += -1 - aa
		elif aa > 0:
			cost += aa - 1
		else:
			zero += 1
			cost += 1
	if sign < 0 and zero == 0:
		cost += 2
	print(cost)
while tcid < tcmax:
	tcid += 1
	mainloop(tcid)


import sys
n = int(sys.stdin.readline())
neg = 0
pos = 0
zer = 0
line = sys.stdin.readline().split()
nums = list(map(int, line))
coins = 0
for i in range(n):
	if nums[i] < 0:
		neg += 1
		coins += -(nums[i] + 1)
	elif nums[i] > 0:
		pos += 1
		coins += nums[i] - 1
	else:
		zer += 1
		coins += 1
if neg % 2 != 0 and zer == 0:
	coins += 2
print(coins)


n = int(input(''))
l = list(map(int, input('').split(' ')))
no_of_zeros = 0
ans = 0
prod = 1
for i in range(len(l)):
	if l[i] == 0:
		no_of_zeros += 1
	if l[i] > 0:
		ans += l[i] - 1
	elif l[i] < 0:
		ans += -l[i] - 1
		prod *= -1
if prod == 1:
	print(ans + no_of_zeros)
elif prod == -1:
	if no_of_zeros == 0:
		print(ans + 2)
	else:
		print(ans + no_of_zeros)


n = int(input())
l = input().split()
li = [int(i) for i in l]
numn = 0
free = 0
sumi = 0
for i in li:
	mina = min(abs(i + 1), abs(i - 1))
	if mina == abs(i + 1) and mina == abs(i - 1):
		free = 1
	elif mina == abs(i + 1):
		numn += 1
	sumi += mina
if free == 0 and numn % 2 == 1:
	sumi += 2
print(sumi)


n = int(input())
a = list(map(int, input().split()))
c = 0
k = 0
s = 0
for i in range(n):
	if a[i] > 0:
		s = s + a[i] - 1
	elif a[i] < 0:
		s = s - 1 - a[i]
		k = k + 1
	else:
		c = c + 1
if k % 2 != 0 and c == 0:
	s = s + 2
else:
	s = s + c
print(s)


def product(n):
	x = 1
	for i in n:
		if i < 0:
			x = x * -1
	return x
op = 0
pm = False
m = int(input())
n = input()
n = n.split(' ')
for i in range(len(n)):
	n[i] = int(n[i])
if product(n) <= 0:
	pm = True
for i in range(len(n)):
	if n[i] < -1:
		op += -1 - n[i]
		n[i] = -1
	elif n[i] == 0 and (not pm):
		op += 1
		n[i] = 1
	elif n[i] > 1:
		op += n[i] - 1
		n[i] = 1
	elif n[i] == 0 and pm:
		n[i] = -1
		op += 1
		pm = False
if product(n) <= 0:
	pm = True
if pm == True:
	for i in range(len(n)):
		if n[i] <= 0 and pm:
			op += 1 - n[i]
			n[i] = 1
			pm = False
print(op)


n = int(input())
l = list(map(int, input().split()))
cnt = neg = pos = ze = 0
for i in l:
	if i < 0:
		cnt = cnt - i - 1
		neg += 1
	elif i > 0:
		cnt = cnt + i - 1
	else:
		ze += 1
if ze == 0:
	if neg % 2 != 0:
		print(cnt + 2)
	else:
		print(cnt)
else:
	print(cnt + ze)


n = int(input())
a = [int(x) for x in input().split()]
dp = [0] * n
neg = 0
x = 0
for i in range(n):
	if a[i] < 0:
		x = x + abs(a[i] + 1)
		neg += 1
	elif a[i] > 0:
		x = x + a[i] - 1
	elif a[i] == 0:
		x = x + abs(abs(a[i]) - 1)
if neg % 2 == 1:
	if 0 not in a:
		x = x + 2
print(x)


length = list(map(int, input().split()))
Array = list(map(int, input().split()))

def countNeg(nums):
	count = 0
	for a in nums:
		if a < 0:
			count += 1
	return count
coins = 0
Zeros = False
for a in Array:
	if a > 1:
		coins = coins + a - 1
		a = a - (a - 1)
	elif a < -1:
		coins = coins + (a + 1) * -1
		a = a + (a + 1) * -1
	elif a == 0:
		Zeros = True
		coins = coins + 1
		a = 1
if countNeg(Array) % 2 != 0 and (not Zeros):
	coins += 2
print(coins)


n = int(input())
nums = list(map(int, input().split()))
odd = 0
coins = 0
zeros = 0
for i in nums:
	if i < 0:
		odd = (odd + 1) % 2
		coins += i * -1 - 1
	if i > 0:
		coins += i - 1
	if i == 0:
		zeros += 1
if odd == 0:
	coins += zeros
elif zeros == 0:
	coins += zeros + 2
else:
	coins += zeros
print(coins)


n = int(input())
l = list(map(int, input().split()))
neg = 0
count = 0
z = 1
for i in l:
	if i < 0:
		neg += 1
	if i == 0:
		z = 0
	count += abs(abs(i) - 1)
if neg % 2 != 0 and z:
	count += 2
print(count)


n = int(input())
l2 = []
l1 = list(map(int, input().split()))
for i in l1:
	if i < 0:
		l2.append(i)
sum1 = 0
if len(l2) % 2 == 0:
	for i in l2:
		sum1 += abs(i + 1)
	for i in l1:
		if i > 0:
			sum1 += i - 1
		if i == 0:
			sum1 += 1
else:
	count1 = 0
	for i in range(len(l2) - 1):
		sum1 += abs(l2[i] + 1)
	for i in l1:
		if i == 0:
			count1 += 1
	if count1 >= 1:
		sum1 += abs(l2[len(l2) - 1]) + count1 - 1
	else:
		sum1 += abs(l2[len(l2) - 1]) + 1
	for i in l1:
		if i > 0:
			sum1 += i - 1
print(sum1)


n = int(input())
a = list(map(int, input().split()))
neg = 0
a.sort()
j = 0
for i in range(n):
	if a[i] < 0:
		neg += 1
	else:
		j = i - 1
		break
if 0 in a:
	k = -1 - a[j]
else:
	k = 1 - a[j]
if neg % 2 == 1:
	a[j] = 1
dp = [0] * n
for i in range(n):
	dp[i] = min(dp[i - 1] + abs(1 - a[i]), dp[i - 1] + abs(-1 - a[i]))
print(dp[-1] + k if neg % 2 == 1 else dp[-1])


input()
a_all = list(map(int, input().split()))
count = 0
n = 0
z = 0
for a in a_all:
	if a < 0:
		count += -1 - a
		n += 1
	elif a > 0:
		count += a - 1
	else:
		count += 1
		z += 1
if n % 2 and z == 0:
	count += 2
print(count)


n = int(input())
a = list(map(int, input().split()))
c = 0
for i in range(n):
	if a[i] > 0:
		c += a[i] - 1
		a[i] = 1
	elif a[i] < 0:
		c += abs(a[i] + 1)
		a[i] = -1
c0 = a.count(0)
c1 = a.count(-1)
d = c1 - c0
if c0 >= c1 or c1 % 2 == 0:
	print(c + c0)
else:
	for i in range(n):
		if d % 2 == 0:
			break
		if a[i] == -1 and c0 < 1:
			c += 2
			d -= 1
	print(c + c0)


n = int(input())
l = list(map(int, input().split()))
a = []
b = []
j = m = k = 0
for i in l:
	a.append(abs(i - 1))
	b.append(abs(i + 1))
for i in range(len(l)):
	m += min(a[i], b[i])
	if b[i] < a[i]:
		j += 1
	if b[i] <= a[i]:
		k += 1
if j % 2 == 1 and k == j:
	print(m + 2)
else:
	print(m)


n = int(input())
q = [int(x) for x in input().split()]
ans = zeros = negative = 0
for (i, x) in enumerate(q):
	if x < 0:
		q[i] = -1
		ans += abs(x + 1)
		negative += 1
	elif x > 0:
		q[i] = 1
		ans += abs(x - 1)
	else:
		zeros += 1
		ans += 1
if negative & 1:
	if not zeros:
		ans += 2
print(ans)


n = int(input())
arr = list(map(int, input().split()))
res = 0
neg = 0
zero = 0
for i in range(n):
	if arr[i] == -1:
		neg += 1
	elif arr[i] not in [1, -1]:
		if arr[i] < -1:
			res += abs(arr[i] + 1)
			neg += 1
		elif arr[i] > 1:
			res += abs(arr[i] - 1)
		else:
			res += 1
			zero += 1
if neg % 2 != 0 and zero == 0:
	res += 2
print(res)


n = int(input())
data = list(map(int, input().split()))
hasZero = False
result = 0
for i in range(n):
	if data[i] == 0:
		hasZero = True
	if data[i] < 0:
		result += -1 - data[i]
		data[i] = -1
	elif data[i] >= 0:
		result += abs(data[i] - 1)
		data[i] = 1
tmp = 1
for d in data:
	tmp *= d
if tmp == 1 or hasZero:
	print(result)
else:
	print(result + 2)


n = int(input())
a = list(map(int, input().split()))
(c, d, z) = (0, 0, 0)
for i in range(n):
	if a[i] < -1:
		c += -(a[i] + 1)
		d += 1
	elif a[i] > 1:
		c += a[i] - 1
	elif a[i] == -1:
		d += 1
	elif a[i] == 0:
		z += 1
if d % 2 == 0:
	print(c + z)
elif z > d % 2:
	print(c + z)
else:
	print(c + 2 * (d % 2 - z) + z)


n = int(input())
A = list(map(int, input().split()))
cost = 0
(neg, z) = (0, 0)
for i in A:
	if i < 0:
		neg = neg + 1
		cost = cost + abs(i) - 1
	elif i > 0:
		cost = cost + i - 1
	elif i == 0:
		z = z + 1
		cost = cost + 1
if neg % 2 == 0:
	print(cost)
elif neg % 2 == 1 and z > 0:
	print(cost)
else:
	print(cost + 2)


n = int(input())
p = [int(x) for x in input().split()]
s = 0
a = 0
b = 0
for i in range(0, n):
	if p[i] > 0:
		s += p[i] - 1
		a += 1
	elif p[i] < 0:
		s += -p[i] - 1
		b += 1
if a + b == n:
	if b % 2 == 0:
		print(s)
	else:
		print(s + 2)
else:
	print(s + n - a - b)


def string2list(x):
	x = x.split()
	i = 0
	for i in range(len(x)):
		x[i] = int(x[i])
	return x
one_solutions = []
mone_solutions = []
n = int(input())
sequence = string2list(input())
k = 0
while k < n:
	current_one = abs(sequence[k] - 1)
	current_m_one = abs(sequence[k] + 1)
	if k == 0:
		one_solutions.append(current_one)
		mone_solutions.append(current_m_one)
	else:
		one_solution = min(one_solutions[k - 1] + current_one, mone_solutions[k - 1] + current_m_one)
		mone_solution = min(one_solutions[k - 1] + current_m_one, mone_solutions[k - 1] + current_one)
		one_solutions.append(one_solution)
		mone_solutions.append(mone_solution)
	k = k + 1
print(one_solutions[n - 1])


n = int(input())
arr = [int(i) for i in input().split()][:n]
k = 0
neg = 0
negarr = []
pos = 0
posarr = []
zero = 0
zeroarr = []
for i in range(n):
	if arr[i] > 0:
		pos = pos + 1
		posarr.append(i)
	elif arr[i] < 0:
		neg = neg + 1
		negarr.append(i)
	elif arr[i] == 0:
		zero = zero + 1
		zeroarr.append(i)
for i in range(neg):
	negarr[i] = arr[negarr[i]]
negarr.sort()
for i in range(pos):
	posarr[i] = arr[posarr[i]]
negarr.sort()
for i in range(len(negarr)):
	k = k + (-1 - negarr[i])
for i in range(len(posarr)):
	k = k + (posarr[i] - 1)
if neg % 2 != 0:
	if zero:
		k = k + 1
		zero = zero - 1
	else:
		k = k + 2
k = k + zero
print(k)


n = int(input())
l = [*map(int, input().split())]
negatives = 0
noo = 0
flag = 0
for i in l:
	if i < 0:
		negatives += 1
		noo += -(i - 1)
	elif i > 0:
		noo += i - 1
	else:
		noo += 1
		flag = 1
if negatives & 1:
	if flag:
		noo = noo - negatives * 2
	else:
		noo = noo - (negatives - 1) * 2
else:
	noo = noo - negatives * 2
print(noo)


def solve(n, a):
	x = abs(a[0] - 1)
	y = abs(a[0] + 1)
	for i in range(1, n):
		(k, t) = (abs(a[i] - 1), abs(a[i] + 1))
		(x, y) = (min(x + k, y + t), min(x + t, y + k))
	return x

def main():
	n = int(input())
	a = list(map(int, input().split()))
	print(solve(n, a))
main()


import sys

def main():
	(_, *l) = map(int, sys.stdin.read().strip().split())
	(c1, c2, z) = (0, 0, 0)
	for i in l:
		c1 += abs(abs(i) - 1)
		z += not i
		c2 += i < 0
	return c1 + 2 * (not z) * (c2 % 2)
print(main())


input()
X = sorted(list(map(int, input().split())))
Odd = len(list(filter(lambda x: x <= 0, X)))
Odd = Odd if Odd % 2 == 0 else Odd - 1
SUM = 0
for i in X:
	if Odd != 0:
		SUM += abs(i + 1)
		Odd -= 1
	else:
		SUM += abs(1 - i)
print(SUM)


def main():
	n = int(input())
	lista = list(map(int, input().split()))
	nrOfNegatives = 0
	existaZero = False
	total = 0
	for element in lista:
		if element == 0:
			existaZero = True
		if element < 0:
			nrOfNegatives += 1
		total += abs(abs(element) - 1)
	if nrOfNegatives % 2 == 1 and existaZero == False:
		total += 2
	print(total)
main()


import math
import sys
import collections

def getdict(n):
	d = {}
	if type(n) is list:
		for i in n:
			if i in d:
				d[i] += 1
			else:
				d[i] = 1
	else:
		for i in range(n):
			t = ii()
			if t in d:
				d[t] += 1
			else:
				d[t] = 1
	return d

def cdiv(n, k):
	return n // k + (n % k != 0)

def ii():
	return int(input())

def mi():
	return map(int, input().split())

def li():
	return list(map(int, input().split()))

def lcm(a, b):
	return abs(a * b) // math.gcd(a, b)
n = ii()
d = li()
r = n = z = 0
for i in d:
	r += abs(abs(i) - 1)
	z += i == 0
	n += i < 0
print(r) if n % 2 == 0 or z > 0 else print(r + 2)


n = int(input().strip())
a = input().strip().split(' ')
a = [int(elem) for elem in a]
cont = 0
contNeg = 0
contZero = 0
for elem in a:
	cont = cont + abs(abs(elem) - 1)
	if elem < 0:
		contNeg = contNeg + 1
	elif elem == 0:
		contZero = contZero + 1
if contNeg % 2 == 1 and contZero == 0:
	cont = cont + 2
print(cont)


N = int(input())
A = list(map(int, input().split()))
n = len(list(filter(lambda x: x < 0, A)))
p = len(list(filter(lambda x: x >= 0, A)))
c = 0
for i in range(0, N):
	if A[i] == 1 or A[i] == -1:
		continue
	elif A[i] > 0:
		c += A[i] - 1
	elif A[i] < 0:
		c += -A[i] - 1
if n % 2 != 0 and A.count(0) == 0:
	c += 2
elif A.count(0) != 0:
	c += A.count(0)
print(c)


from sys import stdin
n = int(input())
l = list(map(int, stdin.readline().split()))
(neg, total, zero) = (0, 0, 0)
for i in range(n):
	if l[i] == 0:
		zero += 1
		total += 1
	if l[i] < 0:
		total += abs(l[i] + 1)
		neg += 1
	if l[i] > 0:
		total += l[i] - 1
if neg % 2 == 0:
	print(total)
elif neg % 2 != 0 and zero != 0:
	print(total)
else:
	print(total + 2)


def func(lst):
	prod = 1
	for item in lst:
		if item != 0:
			prod = prod * item
	return prod
w = int(input())
a = list(map(int, input().split()))
count = 0
count1 = 0
for (i, item) in enumerate(a):
	if item < 0 and item != -1:
		count += abs(item + 1)
		a[i] = -1
	if item > 0 and item != 1:
		count += item - 1
		a[i] = 1
	if item == 0:
		count1 += 1
prod = func(a)
if prod == -1 and count1 == 0:
	count = count + 2
else:
	count = count + count1
print(count)


n = int(input())
s = 0
p = 1
z = 0
for a in map(int, input().split()):
	if a < 0:
		s += abs(a + 1)
		p *= -1
	elif a == 0:
		s += 1
		z += 1
	else:
		s += abs(a - 1)
if p == -1 and z == 0:
	s += 2
print(s)


n = int(input())
lis = list(map(int, input().split()))
cp = 0
cn = 0
ans = 0
for i in lis:
	if i < -1:
		ans += abs(i) - 1
		cn += 1
	elif i > 1:
		ans += i - 1
	elif i == 0:
		cp += 1
	elif i == -1:
		cn += 1
if cn % 2 == 0:
	print(ans + cp)
elif cp > 0:
	print(ans + cp)
else:
	print(ans + 2)


n = int(input())
l = list(map(int, input().split()))
count1 = 0
countm1 = 0
zeroflag = -1
cost = 0
for i in range(n):
	if l[i] == 1:
		count1 += 1
	elif l[i] == -1:
		countm1 += 1
	elif l[i] == 0:
		zeroflag = 1
		count1 += 1
		cost += 1
	elif l[i] < 0:
		cost += abs(l[i] + 1)
		countm1 += 1
	elif l[i] > 0:
		cost += l[i] - 1
		count1 += 1
if countm1 % 2 == 0:
	print(cost)
elif zeroflag == 1:
	print(cost)
else:
	print(cost + 2)


t = int(input())
l = [int(i) for i in input().split()]
g = []
count = 0
zero = 0
for i in range(t):
	g.append(int(min(abs(1 - l[i]), abs(l[i] + 1))))
	if l[i] < 0:
		count += 1
	if l[i] == 0:
		zero += 1
if count % 2 == 1 and zero == 0:
	print(sum(g) + 2)
else:
	print(sum(g))


n = int(input())
a = map(int, input().split())
cost = 0
neg = 0
zeroes = 0
for num in a:
	if num > 0:
		cost += num - 1
	if num < 0:
		cost += -(num + 1)
		neg += 1
	if num == 0:
		cost += 1
		zeroes += 1
if neg % 2 == 0:
	print(cost)
elif neg % 2 != 0 and zeroes > 0:
	print(cost)
else:
	print(cost + 2)


n = int(input())
a = list(map(int, input().split()))
pos = []
neg = []
zero = []
coin = 0
for num in a:
	if num > 0:
		pos.append(num)
	elif num == 0:
		zero.append(num)
	else:
		neg.append(num)
for num in pos:
	coin += num - 1
for num in neg:
	coin += -1 - num
if len(zero) > 0:
	coin += len(zero)
elif len(neg) % 2 == 1:
	coin += 2
print(coin)


n = int(input())
a = list(input().split(' '))
negL = []
negC = 0
posL = []
posC = 0
zL = []
zC = 0
c = 0
for i in range(n):
	a[i] = int(a[i])
for i in range(n):
	if a[i] < 0:
		negC = negC + 1
		negL.append(a[i])
	elif a[i] == 0:
		zC = zC + 1
		zL.append(a[i])
	else:
		posC = posC + 1
		posL.append(a[i])
for i in range(negC):
	c = c + (-1 - negL[i])
for i in range(posC):
	c = c + (posL[i] - 1)
if negC % 2 == 1:
	if zC == 0:
		c = c + 2
	else:
		c = c + 1
		zC = zC - 1
c = c + zC
print(c)


n = int(input())
count1 = 0
o = 0
w = [int(x) for x in input().split(' ')]
for i in range(0, len(w)):
	if w[i] < -1:
		count1 = count1 + (-1 - w[i])
	if w[i] > 1:
		count1 = count1 + w[i] - 1
	if w[i] < 0:
		o = o + 1
if o % 2 == 0:
	if w.count(0) != 0:
		count1 = count1 + w.count(0)
	else:
		pass
elif w.count(0) != 0:
	count1 = w.count(0) + count1
else:
	count1 = count1 + 2
print(count1)


p = input()
c = list(map(int, input().split()))
k = 0
minus = 0
if 0 in c:
	for i in c:
		k += abs(abs(i) - 1)
else:
	for i in c:
		if i > 0:
			k += i - 1
		else:
			minus += 1
			k += -i - 1
	if minus % 2 == 1:
		k += 2
print(k)


n = int(input())
a = [int(x) for x in input().split()]
coin = 0
null = 0
minus = 0
for i in range(n):
	if a[i] <= -1:
		coin += abs(a[i] + 1)
		minus += 1
	elif a[i] > 1:
		coin += a[i] - 1
	if a[i] == 0:
		coin += 1
		null += 1
if minus % 2 != 0 and null == 0:
	coin += 2
print(coin)


n = int(input())
A = list(map(int, input().split()))
z = 0
g = 0
sign = True
for i in A:
	if i <= 0:
		if i == 0:
			z += 1
		else:
			sign = not sign
			g += -1 - i
	else:
		g += i - 1
if not sign:
	if z > 0:
		z -= 1
		g += 1
	else:
		g += 2
if z > 0:
	g += z
print(g)


n = int(input())
a = list(map(int, input().split()))
res = 0
count = 0
zeros = 0
for i in range(n):
	if a[i] < 0:
		res += abs(a[i] + 1)
		count += 1
	else:
		res += abs(a[i] - 1)
		zeros += a[i] == 0
if count % 2:
	res += 2 * (zeros == 0)
print(res)


n = int(input())
L = [int(i) for i in input().split()]
moins = []
plus = []
for i in range(len(L)):
	if L[i] < 0:
		moins.append(-1 - L[i])
		plus.append(1 - L[i])
	elif L[i] == 0:
		moins.append(1)
		plus.append(1)
	else:
		plus.append(-1 + L[i])
		moins.append(1 + L[i])
c = 0
s = 0
p = 1
B = list(L)
for i in range(len(L)):
	c += min(moins[i], plus[i])
	s = min(moins[i], plus[i])
	if L[i] <= 0:
		B[i] += s
		p *= B[i]
	else:
		B[i] -= s
		p *= B[i]
if p == 1:
	print(c)
else:
	k = c - min(moins[0], plus[0]) + max(moins[0], plus[0])
	for i in range(1, len(L)):
		l = c - min(moins[i], plus[i]) + max(moins[i], plus[i])
		if k > l:
			k = l
	print(k)


n = int(input())
a = [int(i) for i in input().split()]
e = 0
c = 0
f = 0
for i in range(n):
	if a[i] < 0:
		c += abs(-1 - a[i])
		e += 1
	else:
		c += abs(1 - a[i])
	if a[i] == 0:
		f = 1
if f == 1:
	print(c)
elif e % 2 == 0:
	print(c)
else:
	print(c + 2)


n = int(input())
arr = list(map(int, input().split()))
neg = 0
pos = 0
tot = 0
nulls = 0
for i in range(n):
	if arr[i] < 0:
		neg += 1
		tot += -1 - arr[i]
	elif arr[i] > 0:
		pos += 1
		tot += arr[i] - 1
	else:
		nulls += 1
if neg % 2 == 1:
	if nulls:
		print(tot + nulls)
	else:
		print(tot + 2)
else:
	print(tot + nulls)


from sys import stdin, stdout
import bisect
import math

def st():
	return list(stdin.readline().strip())

def inp():
	return int(stdin.readline())

def li():
	return list(map(int, stdin.readline().split()))

def mp():
	return map(int, stdin.readline().split())

def pr(n):
	stdout.write(str(n) + '\n')

def soe(limit):
	l = [1] * (limit + 1)
	prime = []
	for i in range(2, limit + 1):
		if l[i]:
			prime.append(i)
			for j in range(i * i, limit + 1, i):
				l[j] = 0
	return prime

def segsoe(low, high):
	limit = int(high ** 0.5) + 1
	prime = soe(limit)
	n = high - low + 1
	l = [0] * (n + 1)
	for i in range(len(prime)):
		lowlimit = low // prime[i] * prime[i]
		if lowlimit < low:
			lowlimit += prime[i]
		if lowlimit == prime[i]:
			lowlimit += prime[i]
		for j in range(lowlimit, high + 1, prime[i]):
			l[j - low] = 1
	for i in range(low, high + 1):
		if not l[i - low]:
			if i != 1:
				print(i)

def power(a, n):
	r = 1
	while n:
		if n & 1:
			r = r * a
			n = n - 1
		else:
			a = a * a
			n = n >> 1
	return r

def solve():
	n = inp()
	l = li()
	(c, neg, zero) = (0, 0, 0)
	for i in l:
		if i < 0:
			c += -1 - i
			neg += 1
		elif i > 0:
			c += i - 1
		else:
			zero += 1
	if zero > 0:
		c += zero
	elif neg & 1:
		c += 2
	pr(c)
for _ in range(1):
	solve()


from math import *
n = int(input())
flag = 0
a = [int(x) for x in input().split()]
p = []
n = []
sumi = 0
for i in a:
	if i < 0:
		n.append(i)
	elif i > 0:
		p.append(i)
for i in a:
	if i == 0 and len(n) % 2 == 1:
		sumi += 1
		flag = 1
	elif i == 0 and len(n) % 2 == 0:
		sumi += 1
if len(n) % 2 == 1:
	if flag == 0:
		sumi += abs(sum(n)) - len(n) + 2
	else:
		sumi += abs(sum(n)) - len(n)
else:
	sumi += abs(sum(n)) - len(n)
sumi += sum(p) - len(p)
print(sumi)


n = int(input())
a = list(map(int, input().split()))
count = 0
r = 0
p = 0
c = 0
for i in a:
	if i < 0:
		count = count + abs(i + 1)
		r = r + 1
	elif i > 0:
		p = p + i - 1
	else:
		c = c + 1
if r % 2 != 0:
	if c == 0:
		count += 2
print(count + p + c)


N = int(input())
ar = list(map(int, input().split()))
ar.sort()
n = []
p = []
z = []
for i in range(N):
	if ar[i] < 0:
		n.append(ar[i])
	elif ar[i] > 0:
		p.append(ar[i])
	else:
		z.append(ar[i])
if len(n) == 1 and len(z) > 0:
	ans = abs(n[0] + 1) + 1
	for i in range(len(p)):
		ans += p[i] - 1
	for i in range(1, len(z)):
		ans += 1
	print(ans)
elif len(n) == 1 and len(z) == 0:
	ans = abs(n[0] + 1) + 2
	for i in range(len(p)):
		ans += p[i] - 1
	print(ans)
elif len(n) % 2 == 0:
	ans = 0
	for i in range(len(n)):
		ans += abs(n[i] + 1)
	for i in range(len(z)):
		ans += 1
	for i in range(len(p)):
		ans += p[i] - 1
	print(ans)
elif len(n) % 2 == 1:
	ans = 0
	for i in range(len(n) - 1):
		ans += abs(n[i] + 1)
	for i in range(len(p)):
		ans += p[i] - 1
	if len(z) == 0:
		ans += abs(n[-1] + 1) + 2
		print(ans)
	else:
		ans += abs(n[-1] + 1) + 1
		for i in range(1, len(z)):
			ans += 1
		print(ans)


from functools import reduce
n = int(input())
a = list(map(int, input().split(' ')))
zero = 0
count = 0
for i in range(n):
	if a[i] == 0:
		zero += 1
	elif a[i] > 1:
		count += a[i] - 1
		a[i] = 1
	elif a[i] < -1:
		count += abs(a[i] + 1)
		a[i] = -1
pro = reduce(lambda x, y: x * y, a)
if zero != 0:
	count += zero
if pro == -1 and zero == 0:
	count += 2
print(count)


n = int(input())
it = list(map(int, input().split()))
a = [i for i in it if i <= -1]
b = [i for i in it if i >= 1]
c = n - len(a) - len(b)
if len(a) % 2 == 0:
	print(sum([-1 - i for i in a]) + sum([i - 1 for i in b]) + 1 * c)
if len(a) % 2 == 1:
	if c != 0:
		print(sum([-1 - i for i in a]) + sum([i - 1 for i in b]) + 1 * c)
	else:
		aa = sum([-1 - i for i in a])
		bb = -1 - max(a)
		cc = sum([i - 1 for i in b])
		d = 1 - max(a)
		print(aa - bb + cc + d)


t = int(input())
k = list(map(int, input().split()))
k.sort()
ans = 0
z = 0
n = 0
for i in range(t):
	if k[i] > 0:
		ans = ans + k[i] - 1
	elif k[i] == 0:
		z = z + 1
	else:
		n = n + 1
if (z + n) % 2 == 0:
	for i in range(t):
		if k[i] < 0:
			ans = ans + abs(k[i]) - 1
		elif k[i] == 0:
			ans = ans + 1
elif n % 2 == 1:
	for i in range(t):
		if k[i] < 0:
			ans = ans + abs(k[i]) - 1
		elif k[i] == 0:
			ans = ans + 1
	if z == 0:
		ans = ans + 2
else:
	for i in range(t):
		if k[i] < 0:
			ans = ans + abs(k[i]) - 1
		elif k[i] == 0:
			ans = ans + 1
print(ans)


n = int(input())
a = list(map(int, input().split()))
l = 0
m = -9999999999999
for i in range(0, len(a)):
	if a[i] <= 0:
		l += 1
	if a[i] > m and a[i] <= 0:
		m = a[i]
if l % 2 == 0:
	l = 0
	for i in range(0, len(a)):
		if a[i] <= 0:
			a[i] = a[i] * -1
		p = a[i] - 1
		if p < 0:
			p = p * -1
		l = l + p
	print(l)
else:
	l = 0
	q = 0
	for i in range(0, len(a)):
		if a[i] == m and q == 0:
			a[i] = a[i] * -1
			if a[i] != 0 and a[i] != -1:
				l = l + 2
			q = 1
		if a[i] <= 0:
			a[i] = a[i] * -1
		p = a[i] - 1
		if p < 0:
			p = p * -1
		l = l + p
	print(l)


from sys import stdin
input = stdin.readline

def getMinCost(arr: list, n: int) -> int:
	totalCost = 0
	(neg, numZ) = (0, 0)
	maxNeg = -(1 << 31)
	for i in range(n):
		if arr[i] == 0:
			totalCost += 1
			numZ += 1
		if arr[i] < 0:
			maxNeg = max(maxNeg, arr[i])
			neg += 1
			totalCost += -1 - arr[i]
		if arr[i] > 0:
			totalCost += arr[i] - 1
	if neg > 0:
		if neg % 2 != 0 and numZ == 0:
			totalCost -= -1 - maxNeg
			totalCost += 1 - maxNeg
	return totalCost
n = int(input())
arr = list(map(int, input().split()))
print(getMinCost(arr, n))


n = int(input())
a = [int(i) for i in input().split()]
a.sort()
dp = [0] * n
neg = 0
ze = 0
if a[0] < -1:
	neg += 1
	dp[0] = abs(a[0] + 1)
elif a[0] == -1:
	neg += 1
elif a[0] == 0:
	ze += 1
	dp[0] += 1
else:
	dp[0] = a[0] - 1
for i in range(1, n):
	if a[i] < -1:
		dp[i] = dp[i - 1] + abs(a[i] + 1)
		neg += 1
	elif a[i] == -1:
		neg += 1
		dp[i] = dp[i - 1]
	elif a[i] == 0:
		dp[i] = dp[i - 1] + 1
		ze += 1
	else:
		dp[i] = dp[i - 1] + a[i] - 1
if neg % 2 != 0 and ze > 0:
	print(dp[n - 1])
elif neg % 2 == 0:
	print(dp[n - 1])
else:
	print(dp[n - 1] + 2)


n = int(input())
a = [int(i) for i in input().split()]
g = 0
i = 0
while i < n:
	if a[i] > 1:
		temp = a[i]
		a[i] = 1
		g += temp - 1
	if a[i] < -1:
		temp = a[i]
		a[i] = -1
		g += -1 - temp
	i += 1
c = a.count(0)
if a.count(-1) % 2 and c < 1:
	g += 2
print(g + c)


n = int(input())
a = list(map(int, input().split()))
s = 0
p = 0
z = 0
for x in a:
	if x > 0:
		p += 1
		s += x - 1
	if x < 0:
		s += -1 - x
	if x == 0:
		z += 1
neg = n - p - z
if neg % 2:
	if z:
		print(s + z)
	else:
		print(s + 2)
elif z:
	print(s + z)
else:
	print(s)


input()
arr = list(map(int, input().split()))
zeros = 0
closer_to_minus_ones = 0
dist = 0
for x in arr:
	if x == 0:
		zeros += 1
		dist += 1
	elif x > 0:
		dist += x - 1
	else:
		closer_to_minus_ones += 1
		dist += -1 - x
if closer_to_minus_ones & 1 and zeros == 0:
	print(dist + 2)
else:
	print(dist)


n = int(input())
a = list(map(int, input().split()))
count = neg = flag = 0
for num in a:
	if num > 0:
		count += num - 1
	elif num == 0:
		count += 1
		flag += 1
	else:
		count += -num - 1
		neg += 1
print(count if neg % 2 == 0 or flag else count + 2)


n = int(input())
a = list(map(int, input().split()))
c = 0
p = 1
z = 0
for i in range(n):
	x = a[i]
	if not x == 0:
		c += abs(x) - 1
		p *= x // abs(x)
	else:
		z += 1
if z == 0 and p == 1:
	print(c)
elif z == 0 and p == -1:
	print(c + 2)
else:
	print(c + z)


t = int(input())
l = list(map(int, input().split()))
ans = 0
z = 0
n = 0
p = 0
for j in l:
	if j < 0:
		if j == -1:
			n = n + 1
		else:
			ans = ans + (abs(j) - 1)
			n = n + 1
	if j > 0:
		if j == 1:
			p = p + 1
		else:
			p = p + 1
			ans = ans + j - 1
	if j == 0:
		z = z + 1
if n % 2 == 0:
	ans = ans + z
elif n % 2 != 0:
	if z == 0:
		ans = ans + 2
	else:
		ans = ans + z
print(ans)


n = int(input())
s = list(map(int, input().split()))
count = 0
product = 1
for i in range(len(s)):
	if s[i] < -1:
		product = product * -1
		count += abs(s[i] - -1)
	elif s[i] > 1:
		product = product * 1
		count += s[i] - 1
	elif s[i] == 0:
		if product == 1:
			product = product * 1
		elif product == -1:
			product = product * -1
		count += 1
	elif s[i] == -1 or 1:
		product = product * s[i]
if product == -1:
	if 0 in s:
		print(count)
	else:
		print(count + 2)
elif product == 1:
	print(count)


def main():
	n = int(input())
	arr = [int(x) for x in input().split(' ')]
	ans_1 = [0] * n
	ans_2 = [0] * n
	for i in range(n):
		if i == 0:
			ans_1[i] = abs(1 - arr[i])
			ans_2[i] = abs(-1 - arr[i])
		else:
			ans_1[i] = min(abs(1 - arr[i]) + ans_1[i - 1], abs(-1 - arr[i]) + ans_2[i - 1])
			ans_2[i] = min(abs(1 - arr[i]) + ans_2[i - 1], abs(-1 - arr[i]) + ans_1[i - 1])
	print(ans_1[-1])
main()


input()
a = [int(i) for i in input().split()]
otr = 0
s = 0
null = 0
for i in a:
	if i < 0:
		otr += 1
	if i == 0:
		null += 1
	s += abs(abs(i) - 1)
if otr % 2 != 0 and null == 0:
	s += 2
print(s)


n = int(input())
nums = [int(x) for x in input().split()]

def coins_needed(nums):
	count = 0
	negative_count = 0
	max_negative = -float('inf')
	for x in nums:
		if x > 0:
			count += x - 1
		if x <= 0:
			count += abs(-1 - x)
			negative_count += 1
			max_negative = max(max_negative, x)
	if negative_count % 2 == 0:
		return count
	else:
		return count + (1 - max_negative) - abs(-1 - max_negative)
print(coins_needed(nums))


n = int(input())
a = sorted([int(x) for x in input().split()])
has_zero = 0
cnt = 0
ans = 0
for i in a:
	if i < 0:
		cnt = cnt - 1 - i
		ans = ans + 1
	elif i > 0:
		cnt = cnt + i - 1
	else:
		has_zero = 1
		cnt = cnt + 1
if ans % 2 == 1 and has_zero == 0:
	cnt += 2
print(cnt)


na = int(input())
a = [int(x) for x in str(input()).split()]
neg = 0
zero = 0
coins = 0
for x in a:
	if x < 0:
		coins = coins + abs(x) - 1
		neg = neg + 1
	elif x > 0:
		coins = coins + x - 1
	else:
		coins = coins + 1
		zero = zero + 1
if zero > 0:
	ans = coins
elif neg % 2 == 1:
	ans = coins + 2
else:
	ans = coins
print(ans)


a_N = int(input())
a = list(map(int, input().split()))
coins = 0
neg = 0
for i in a:
	if i == 0:
		coins += 1
	else:
		coins += abs(i) - 1
	if i < 0:
		neg += 1
if neg % 2 == 1 and 0 not in a:
	coins += 2
print(coins)


from sys import stdin, stdout
from collections import Counter
import math

def rsingle_int():
	return int(stdin.readline().rstrip())

def rmult_int():
	return [int(x) for x in stdin.readline().rstrip().split()]

def rmult_str():
	return stdin.readline().rstrip().split()

def r_str():
	return stdin.readline().rstrip()

def rsingle_char():
	return stdin.read(1)

def main():
	n = rsingle_int()
	a = rmult_int()
	num_steps = 0
	num_negatives = 0
	has_zero = False
	for el in a:
		if el > 0:
			num_steps += el - 1
		elif el == 0:
			has_zero = True
			num_steps += 1
		else:
			num_negatives += 1
			num_steps += -(el + 1)
	if num_negatives % 2 != 0 and (not has_zero):
		num_steps += 2
	print(num_steps)
main()


n = int(input())
a = list(map(int, input().split()))
neg = []
zero = []
pos = []
ans = 0
for x in a:
	if x < 0:
		neg.append(x)
	elif x == 0:
		zero.append(x)
	else:
		pos.append(x)
neg = sorted(neg)
zero = sorted(zero)
pos = sorted(pos)
if len(neg) % 2 != 0:
	if len(zero) > 0:
		zero.pop()
		neg.append(0)
	elif len(pos) > 0:
		neg.append(pos[0])
		pos.remove(pos[0])
ans += len(zero)
for x in pos:
	ans += abs(1 - x)
if len(neg) % 2 == 0:
	for x in neg:
		ans += abs(-1 - x)
else:
	ans += abs(1 - neg[0])
	for x in range(1, len(neg)):
		ans += abs(-1 - neg[x])
print(ans)


n = int(input())
a = list(map(int, input().split()))
num_ne = 0
num_ne = sum((1 for i in a if i < 0))
count = 0
zeros = a.count(0)
if num_ne % 2 != 0 and zeros == 0:
	count = 2
for i in range(n):
	if a[i] < 0:
		count = count + abs(1 + a[i])
	if a[i] > 0:
		count = count + abs(1 - a[i])
	if a[i] == 0:
		count = count + 1
print(count)


n = int(input())
l = list(map(int, input().split()))
minus = 0
minus_count = 0
plus_count = 0
plus = 0
zero = 0
for i in range(n):
	if l[i] < 0:
		minus += 1
		minus_count += -1 * l[i] - 1
	elif l[i] == 0:
		zero += 1
	else:
		plus += 1
		plus_count += l[i] - 1
if minus % 2 == 0:
	print(minus_count + plus_count + zero)
elif zero > 0:
	print(minus_count + plus_count + zero)
else:
	print(minus_count + plus_count + 2)


n = int(input())
ls = list(map(int, input().split()))
op = 0
neg = 0
for i in range(n):
	if ls[i] < 0:
		neg += 1
	res = abs(1 - ls[i])
	if res > abs(-1 - ls[i]):
		res = abs(-1 - ls[i])
	op += res
if neg % 2 == 0 or ls.count(0) != 0:
	print(op)
else:
	print(op + 2)


n = int(input())
a = sorted(list(map(int, input().split())))
ans = 0
neg = 0
zer = 0
for i in a:
	if i > 0:
		if i != 1:
			ans += i - 1
	elif i < 0:
		if i != -1:
			ans += abs(i + 1)
		neg += 1
	else:
		ans += 1
		zer += 1
if neg % 2 == 1 and zer == 0:
	print(ans + 2)
else:
	print(ans)


n = int(input())
list1 = []
count = 0
count1 = 0
count2 = 0
list1 = [int(i) for i in input().split()]
for i in range(0, n):
	if list1[i] != 1:
		if list1[i] < -1:
			count += -1 - list1[i]
			count1 += 1
		if list1[i] > 1:
			count += list1[i] - 1
		if list1[i] == -1:
			count1 += 1
		if list1[i] == 0:
			count2 += 1
if count1 % 2 != 0:
	if count2 > 0:
		count += 1 * count2
	else:
		count += 2
else:
	count += 1 * count2
print(count)


t = int(input())
x = [int(q) for q in input().split()]
n = 0
z = 0
for i in range(len(x)):
	if x[i] < 0:
		n += 1
	if x[i] == 0:
		z += 1
s = 0
for i in range(len(x)):
	if x[i] > 1:
		s += x[i] - 1
	if x[i] < -1:
		s += abs(x[i]) - 1
	if x[i] == 0:
		s += 1
if n % 2 == 1 and z == 0:
	s += 2
print(s)


import math
mod = 10 ** 9 + 7

def main():
	n = int(input())
	arr = [int(x) for x in input().split()]
	ar = []
	negchk = 0
	zero = 0
	ans = 0
	for i in arr:
		if i == 0:
			zero += 1
			ans += 1
			ar.append(i)
		if i < 0:
			ans += -1 * (i + 1)
			ar.append(i - i - 1)
		if i > 0:
			ans += i - 1
			i += i - 1
			ar.append(i - i + 1)
	if zero == 0:
		prod = 1
		for i in range(len(ar)):
			prod *= ar[i]
		if prod == -1:
			ans += 2
	print(ans)
main()


n = int(input())
arr = list(map(int, input().split()))
c = 0
neg = 0
zeros = 0
for i in arr:
	if i == 0:
		c += 1
		zeros += 1
	elif i < 0:
		c += -1 - i
		neg += 1
	else:
		c += i - 1
if neg % 2 != 0:
	if zeros == 0:
		c += 2
print(c)


n = int(input())
nums = list(map(int, input().split(' ')))
neg = []
pos = []
zeros = []
for i in range(n):
	if nums[i] < 0:
		neg.append(nums[i])
	elif nums[i] > 0:
		pos.append(nums[i])
	else:
		zeros.append(nums[i])
if len(zeros) > 0 or len(neg) % 2 == 0:
	cost = -len(neg) - sum(neg) + len(zeros) + sum(pos) - len(pos)
else:
	cost = -len(neg) - sum(neg) + 2 + sum(pos) - len(pos)
print(cost)


n = int(input())
arr = list(map(int, input().split()))
ans = 0
ne = 0
found = 0
for i in range(n):
	if arr[i] < 0:
		ans += abs(-arr[i] - 1)
		ne += 1
	if arr[i] > 0:
		ans += abs(-arr[i] + 1)
	if arr[i] == 0:
		found = 1
		ne += 1
		ans += 1
if ne % 2 == 1 and (not found):
	ans += 2
print(ans)


n = int(input())
s = list(map(int, input().split()))
count = 0
coins = 0
zeros = 0
for i in s:
	if i > 0:
		coins += i - 1
	elif i < 0:
		coins += -1 - i
		count += 1
	else:
		zeros += 1
		coins += 1
if count % 2 == 1 and zeros < 1:
	print(coins + 2)
else:
	print(coins)


j = input()
i = input()
userlist = i.split()
a = []
for n in userlist:
	a.append(int(n))
s = 0
z = 0
f = 0
for j in range(len(a)):
	if a[j] < 0:
		z += 1
	if a[j] == 0:
		f += 1
for j in range(len(a)):
	if a[j] >= 0:
		if a[j] == 1:
			s += 0
		elif a[j] == 0:
			s += 1
		else:
			s += a[j] - 1
	if a[j] < 0:
		if z % 2 == 0:
			s = s + (-a[j] - 1)
		else:
			if f > 0:
				s = s + -a[j] - 1
				f = f - 1
			elif a[j] == -1:
				s += 2
			else:
				s += 2 - a[j] - 1
			z -= 1
print(s)


n = int(input())
a = list(map(int, input().split()))
res = 0
nb_minus = 0
nb_zeros = 0
for x in a:
	if x == 0:
		nb_zeros += 1
	elif x > 1:
		res += x - 1
	elif x <= -1:
		res += -1 - x
		nb_minus += 1
nb_minus = nb_minus % 2
if nb_zeros > 0:
	res += nb_zeros - 1
	nb_zeros = 1
if nb_minus == 1:
	if nb_zeros == 1:
		res += 1
	else:
		res += 2
else:
	res += nb_zeros
print(res)


n = int(input())
lst = list(map(int, input().split()))
ans = 0
count = 0
count_0 = 0
for i in range(n):
	if lst[i] < 0:
		count += 1
		ans += lst[i] - 2 * lst[i] - 1
	elif lst[i] == 0:
		ans += 1
		count_0 += 1
	else:
		ans += lst[i] - 1
if count % 2 != 0:
	if count_0 < 1:
		ans += 2
print(ans)


n = int(input())
l = [*map(int, input().split())]
neg = [-e for e in l if e < 0]
zer = l.count(0)
pos = [e for e in l if e > 0]
res = sum(pos) - len(pos) + zer
if neg:
	res += sum(neg) - len(neg)
if len(neg) & 1 and zer == 0:
	res += 2
print(res)


t = int(input())
inp = list(map(int, input().split()))
m1 = []
p1 = []
for i in inp:
	m1.append(abs(i + 1))
	p1.append(abs(i - 1))
zeros = 0
ans = 0
minus = 0
for i in range(len(inp)):
	if inp[i] < 0:
		minus += 1
		ans += m1[i]
	elif inp[i] > 0:
		ans += p1[i]
	else:
		zeros += 1
		ans += p1[i]
if minus % 2 == 1 and zeros == 0:
	ans += 2
print(ans)


t = int(input())
a = list(map(int, input().split()))
a.sort()
B = [x for x in a if x > 0]
C = [x for x in a if x <= 0]
ans = list()
if len(B) != 0:
	for i in range(len(B)):
		ans.append(B[i] - 1)
C.sort()
if len(C) != 0:
	for i in range(len(C)):
		if i == len(C) - 1 and i % 2 == 0:
			if C[i] == 0:
				ans.append(1)
			else:
				ans.append(abs(abs(C[i]) + 1))
		else:
			ans.append(abs(abs(C[i]) - 1))
print(sum(ans))


from bisect import *
from collections import *
from itertools import *
import functools
import sys
import math
from decimal import *
from copy import *
getcontext().prec = 30
MAX = sys.maxsize
MAXN = 10 ** 5 + 10
MOD = 10 ** 9 + 7

def isprime(n):
	n = abs(int(n))
	if n < 2:
		return False
	if n == 2:
		return True
	if not n & 1:
		return False
	for x in range(3, int(n ** 0.5) + 1, 2):
		if n % x == 0:
			return False
	return True

def mhd(a, b):
	return abs(a[0] - b[0]) + abs(b[1] - a[1])

def charIN(x=' '):
	return sys.stdin.readline().strip().split(x)

def arrIN(x=' '):
	return list(map(int, sys.stdin.readline().strip().split(x)))

def eld(x, y):
	a = y[0] - x[0]
	b = x[1] - y[1]
	return (a * a + b * b) ** 0.5

def lgcd(a):
	g = a[0]
	for i in range(1, len(a)):
		g = math.gcd(g, a[i])
	return g

def ms(a):
	msf = -MAX
	meh = 0
	st = en = be = 0
	for i in range(len(a)):
		meh += a[i]
		if msf < meh:
			msf = meh
			st = be
			en = i
		if meh < 0:
			meh = 0
			be = i + 1
	return (msf, st, en)

def ncr(n, r):
	num = den = 1
	for i in range(r):
		num = num * (n - i) % MOD
		den = den * (i + 1) % MOD
	return num * pow(den, MOD - 2, MOD) % MOD

def flush():
	return sys.stdout.flush()

def fac(n):
	ans = 1
	for i in range(1, n + 1):
		ans *= i
		ans %= MOD
	return ans
n = int(input())
a = arrIN()
ans = 0
c0 = a.count(0)
for i in range(n):
	if a[i] >= 0:
		ans += abs(a[i] - 1)
		a[i] = 1
	else:
		ans += abs(-1 - a[i])
		a[i] = -1
c2 = a.count(-1)
if c2 % 2:
	if c0 == 0:
		ans += 2
print(ans)


def Count(A, n):
	c = 0
	z = 0
	for i in A:
		if i < 0:
			c += 1
	return c

def main():
	n = int(input())
	A = list(map(int, input().split()))
	c = Count(A, n)
	count = 0
	for i in A:
		if i >= 0:
			count += abs(i - 1)
		if i < 0:
			count += abs(i + 1)
	if c % 2 == 0:
		print(count)
	elif 0 in A:
		print(count)
	else:
		print(count + 2)
main()


n = int(input())
a = [int(item) for item in input().split()]
ans = 0
minus_cnt = 0
includes_zero = False
for item in a:
	if item == 0:
		includes_zero = True
		ans += 1
	elif item <= -1:
		minus_cnt += 1
		ans += -1 - item
	else:
		ans += item - 1
if includes_zero:
	print(ans)
elif minus_cnt % 2 == 0:
	print(ans)
else:
	print(ans + 2)


n = int(input())
a = [int(x) for x in input().split()]
(c_neg, c_zer, summ) = (0, 0, 0)
for i in range(n):
	if a[i] < 0:
		c_neg += 1
		summ += -1 - a[i]
	elif a[i] == 0:
		c_zer += 1
		summ += 1
	else:
		summ += a[i] - 1
if c_zer == 0 and c_neg % 2 == 1:
	summ += 2
print(summ)


a = int(input())
n = list(map(int, input().split()))
x = 0
c = []
d = 1
e = 1
for i in range(a):
	if n[i] > 0 and n[i] != 1:
		x += n[i] - 1
		c.append(1)
	elif n[i] < 0 and n[i] != -1:
		x += -1 * n[i] - 1
		c.append(-1)
	elif n[i] == 1:
		c.append(1)
	elif n[i] == 0:
		x += 1
		c.append(1)
		e = 0
	else:
		c.append(-1)
for w in range(a):
	d *= c[w]
if d == -1 and e == 1:
	print(x + 2)
else:
	print(x)


n = int(input())
l = list(map(int, input().split()))
sum = 0
zero = 0
pl = 0
mi = 0
for i in l:
	if i < 0:
		sum += -1 - i
		mi += 1
	elif i > 0:
		sum += i - 1
		pl += 1
	else:
		zero += 1
if zero > 0:
	sum += zero
elif mi % 2 == 1:
	sum += 2
print(sum)


num = int(input())
arr = list(map(int, input().split()))
negs = [i for i in arr if i < 0]
pos = [i for i in arr if i >= 0]
negs_summ = abs(sum((1 + i for i in negs)))
pos_summ = sum((abs(i - 1) for i in pos))
if len(negs) % 2 == 0:
	print(negs_summ + pos_summ)
elif not pos:
	print(negs_summ + 2)
else:
	mn = min(pos)
	if mn == 0:
		print(negs_summ + pos_summ)
	else:
		print(negs_summ + pos_summ + 2)


n = int(input())
lst = list(map(int, input().split(' ')))
lst1 = []
ans = 0
count = 0
mult = 1
for i in lst:
	if i > 1:
		ans += i - 1
		lst1.append(1)
	elif i < -1:
		ans += -1 - i
		lst1.append(-1)
	elif i == 1 or i == -1:
		lst1.append(i)
	else:
		count += 1
for i in lst1:
	mult = mult * i
if mult == -1:
	if count == 0:
		ans = ans + 2
	else:
		ans = ans + count
else:
	ans = ans + count
print(ans)


n = int(input())
num = list(map(int, input().split()))
coins = 0
p = 0
q = 0
for i in range(n):
	coins += min(abs(num[i] - 1), abs(num[i] + 1))
	if num[i] <= -1:
		p += 1
	if num[i] == 0:
		q += 1
if p % 2:
	if q:
		print(coins)
	else:
		print(coins + 2)
else:
	print(coins)


n = int(input())
a = []
ans = 0
k = list(map(int, input().split()))
for i in k:
	if i != 1:
		a.append(i)
p = [i for i in a if i > 0]
l = [i for i in a if i < 0]
p.sort()
l.sort(reverse=True)
for i in p:
	ans += i - 1
if len(l) % 2 == 0:
	for i in l:
		ans += abs(i) - 1
	ans += a.count(0)
	print(ans)
	exit()
elif a.count(0):
	ans += a.count(0)
	for i in l:
		ans += abs(i) - 1
	print(ans)
	exit()
elif p:
	for i in l:
		ans += abs(i) - 1
	ans -= p[0] - 1
	ans += p[0] + 1
	print(ans)
	exit()
else:
	ans += abs(l[0]) + 1
	for i in range(1, len(l)):
		ans += abs(l[i]) - 1
	print(ans)
	exit()


from math import *
from sys import *
from collections import defaultdict
M = 10 ** 9 + 7

def pow(a, b):
	res = 1
	while b > 0:
		if b & 1:
			res *= a
		a *= a
		b >>= 1
	return res

def powmod(a, b, m):
	res = 1
	while b > 0:
		if b & 1:
			res = res * a % m
		a *= a
		b >>= 1
	return res

def inv(a, m):
	return powmod(a, m - 2, m)

def factor(n):
	potentional_p = 3
	itog_list = {}
	if n % 2 == 0:
		itog_list[2] = 0
	while n % 2 == 0:
		n = n // 2
		itog_list[2] += 1
	while n - 1:
		if potentional_p > n ** 0.5:
			if n in itog_list:
				itog_list[n] += 1
			else:
				itog_list[n] = 1
			return itog_list
		while n % potentional_p == 0:
			n = n // potentional_p
			if potentional_p in itog_list:
				itog_list[potentional_p] += 1
			else:
				itog_list[potentional_p] = 1
		potentional_p += 2
	return itog_list

def meth(x):
	if x > 1:
		return (x - 1, 1)
	if x == 0:
		return (1, 1)
	if x < -1:
		return (abs(x + 1), -1)
n = int(stdin.readline())
a = list(map(int, stdin.readline().split()))
zc = a.count(0)
res = 0
neg = 0
for i in range(n):
	if a[i] == 1:
		continue
	if a[i] == -1:
		neg += 1
		continue
	(val, fv) = meth(a[i])
	res += val
	a[i] = fv
	if fv == -1:
		neg += 1
if neg % 2 == 1:
	if zc == 0:
		print(res + 2)
	else:
		print(res)
else:
	print(res)


n = int(input())
a = list(map(int, input().split()))
cur = 1
cnt = 0
ans = 0
for x in a:
	if x == 0:
		cnt += 1
		continue
	if abs(1 - x) < abs(-1 - x):
		ans += abs(1 - x)
	else:
		ans += abs(-1 - x)
		cur *= -1
print(ans + cnt if cnt or cur == 1 else ans + 2)


input()
a = [int(s) for s in input().split()]
coins = 0
negative = 0
zero = 0
for i in a:
	if i > 0:
		coins += i - 1
	elif i == 0:
		zero += 1
	else:
		negative += 1
		coins += abs(i) - 1
if negative % 2 == 1:
	if zero > 0:
		zero -= 1
		coins += 1
	else:
		coins += 2
coins += zero
print(coins)


mod = 1000000007
ii = lambda : int(input())
si = lambda : input()
dgl = lambda : list(map(int, input()))
f = lambda : map(int, input().split())
il = lambda : list(map(int, input().split()))
ls = lambda : list(input())
n = ii()
l = il()
l1 = [0] * n
cst = 0
for i in range(n):
	if abs(l[i] - 1) < abs(l[i] + 1):
		cst += abs(l[i] - 1)
		l1[i] = 1
	else:
		cst += abs(l[i] + 1)
		l1[i] = -1
prod = 1
for i in l1:
	prod *= i
if prod == -1 and 0 in l:
	print(cst)
elif prod == -1 and (not 0 in l):
	print(cst + 2)
elif prod == 1:
	print(cst)


lens = int(input())
(pos, neg, zer) = (0, 0, 0)
op_needed = 0
nums = [int(x) for x in input().split()]
for num in nums:
	if num > 0:
		pos += 1
		op_needed += num - 1
	elif num < 0:
		neg += 1
		op_needed += -1 - num
	else:
		zer += 1
if neg % 2:
	if zer:
		op_needed += 1
		zer -= 1
	else:
		op_needed += 2
print(op_needed + zer)


n = input()
liste1 = input().split(' ')
liste = [int(element) for element in liste1]
sum = 0
for element in liste:
	if element < 0:
		sum += 1
result = 0
for element in liste:
	result += min(abs(1 - element), abs(1 + element))
if sum % 2 == 0:
	print(result)
elif 0 not in liste:
	print(str(result + 2))
else:
	print(result)


import math
I = lambda : int(input())
ID = lambda : map(int, input().split())
IL = lambda : list(ID())
n = I()
a = IL()
check = 0
cnt = 0
for i in a:
	if i < 0:
		check += 1
	cnt += abs(abs(i) - 1)
if check & 1:
	if a.count(0) == 0:
		cnt += 2
print(cnt)


n = int(input())
a = list(map(int, input().split()))
coins = 0
for i in range(n):
	if a[i] < 0:
		coins += abs(a[i] + 1)
		a[i] = -1
	if a[i] > 0:
		coins += abs(a[i] - 1)
		a[i] = 1
ct = a.count(0)
if a.count(-1) % 2 == 0:
	coins += ct
elif ct == 0:
	coins += 2
else:
	coins += ct
print(coins)


n = int(input())
ss = [int(i) for i in input().split()]
(non, xx) = (0, 0)
for i in ss:
	if i < 0:
		non += 1
	xx += abs(abs(i) - 1)
if non % 2:
	if 0 not in ss:
		xx += 2
print(xx)


n = int(input())
N = [int(x) for x in input().split()]
total = 0
neg = 0
zero = False
for i in N:
	if i < 0:
		neg += 1
	if i == 0:
		zero = True
	total += abs(i - 1)
print(total - 4 * (neg // 2) - 2 * (neg % 2) * int(zero))


n = int(input())
a = [int(x) for x in input().split()]
arr = counter = 0
for item in a:
	if abs(item + 1) <= abs(item - 1):
		arr += abs(item + 1)
		counter += 1
	else:
		arr += abs(item - 1)
if counter % 2 == 1:
	if 0 in a:
		print(arr)
	else:
		print(arr + 2)
else:
	print(arr)


from sys import stdin
input = stdin.readline
n = int(input())
a = list(map(int, input().split()))
c = 0
for i in range(n):
	if a[i] < 0:
		c += a[i] * -1 - 1
		a[i] = -1
	elif a[i] > 0:
		c += a[i] - 1
		a[i] = 1
m = a.count(-1)
p = a.count(1)
z = n - (m + p)
if m % 2 == 1 and z > 0:
	c += z
elif m % 2 == 1 and z == 0:
	c += 2
else:
	c += z
print(c)


a = int(input())
lst1 = list(map(int, input().split()))
k = 0
odd = 0
zero = 0
for i in lst1:
	if i < 0:
		k = k - i - 1
		odd += 1
	if i > 0:
		k = k + i - 1
	if i == 0:
		zero = 1
		k += 1
if odd % 2 == 1 and zero == 1:
	print(k)
elif odd % 2 == 0:
	print(k)
elif odd % 2 == 1 and zero == 0:
	print(k + 2)


n = int(input())
sum = 1
cnt = 0
zero = 0
a = []
a = input().split()
for i in range(n):
	value = int(a[i])
	if value == 1 or value == -1:
		sum = sum * value
	elif value < -1:
		sum = sum * -1
		cnt = cnt - 1 - value
	elif value == 0:
		cnt = cnt + 1
		zero = zero + 1
	else:
		cnt = cnt + value - 1
if sum < 0 and zero == 0:
	cnt = cnt + 2
print(cnt)


import math
n = int(input())
arr = input().split(' ')
s = 0
negatives = 0
for i in range(len(arr)):
	arr[i] = int(arr[i])
	if arr[i] < 0:
		negatives += 1
	s += abs(abs(arr[i]) - 1)
if negatives % 2 > 0:
	if 0 not in arr:
		s += 2
print(int(s))


(n, s, z, v) = (int(input()), False, False, 0)
for ai in map(int, input().split()):
	if ai > 0:
		v += ai - 1
	elif ai < 0:
		s = not s
		v -= ai + 1
	else:
		z = True
		v += 1
print(v + 2 if s and (not z) else v)


n = int(input())
a = [int(el) for el in input().split()]
ans = 0
b = []
zeros = 0
for i in range(n):
	if a[i] > 0:
		ans += abs(a[i] - 1)
	elif a[i] < 0:
		b.append(a[i])
	else:
		zeros += 1
if len(b) % 2 == 0:
	for i in range(len(b)):
		ans += abs(b[i]) - 1
	ans += zeros
elif zeros == 0:
	for i in range(len(b)):
		ans += abs(b[i]) - 1
	ans += 2
else:
	for i in range(len(b)):
		ans += abs(b[i]) - 1
	ans += zeros
print(ans)


def coins(n, string, abs_arr):
	sumi = sum(abs_arr)
	minus = string.count('-')
	if minus % 2 == 1 and 0 not in abs_arr:
		sumi += 2
	sumi += abs_arr.count(0)
	return sumi - len(list(filter(lambda a: a != 0, abs_arr)))
n = int(input())
string = input()
arr = list(map(int, string.split()))
abs_arr = list(map(lambda a: abs(a), arr))
print(coins(n, string, abs_arr))


import sys
num = int(input())
x = [int(x) for x in input().split()]
x.sort()
i = 0
flag = 0
coins = 0
while i < num:
	if x[i] < 0 and i <= num - 2 and (x[i + 1] <= 0):
		coins = coins + abs(1 + x[i])
		if flag == 1:
			flag = 0
		else:
			flag = 1
	elif flag == 1:
		coins = coins + abs(1 + x[i])
		flag = 0
	else:
		coins = coins + abs(1 - x[i])
	i = i + 1
print(coins)


n = int(input())
t = list(map(int, input().split()))
(u, p, s) = (0, 0, 0)
for i in range(n):
	if t[i] < 0:
		if t[i] == -1:
			p += 1
		else:
			u += (t[i] + 1) * -1
			p += 1
			t[i] = -1
	elif t[i] > 0:
		u += abs(t[i] - 1)
		t[i] = 1
	else:
		s += 1
if p % 2 != 0:
	if s >= p % 2:
		print(u + s)
	else:
		print(u + 2 + s)
else:
	print(u + s)


n = int(input())
cnt = {0: 0, 1: 0, -1: 0}
coin = 0
for x in input().split():
	x = int(x)
	if x > 0:
		coin += abs(x - 1)
		cnt[1] += 1
	elif x < 0:
		coin += abs(x + 1)
		cnt[-1] += 1
	else:
		cnt[0] += 1
if cnt[-1] % 2 != 0:
	if cnt[0] != 0:
		coin += 1
	else:
		coin += 2
	if cnt[0] != 0:
		coin += cnt[0] - 1
else:
	coin += cnt[0]
print(coin)


a1 = int(input())
l = list(map(int, input().split()))
l.sort()
(n, z) = (0, 0)
for i in l:
	if i < 0:
		n += 1
	if i == 0:
		z += 1
if n % 2 != 0 and z > 0:
	n += 1
elif n % 2:
	n -= 1
a = 0
i = 0
while n > 0:
	if i > a1 - 1:
		break
	if l[i] < -1 and n > 0:
		a += abs(l[i]) - 1
		n -= 1
	if l[i] == 0 and n > 0:
		a += 1
		n -= 1
	i += 1
for j in range(i, a1):
	if l[j] > 1:
		a += l[j] - 1
	if l[j] < 0:
		a += abs(l[j]) + 1
	if l[j] == 0:
		a += 1
print(a)


gi = lambda : list(map(int, input().split()))
(n,) = gi()
l = gi()
pos = [e for e in l if e > 0]
neg = [e for e in l if e < 0]
z = [0 for e in l if e == 0]
ans = sum(pos) - len(pos) + len(z) + sum(map(abs, neg)) - len(neg)
if len(neg) % 2:
	if not z:
		ans += 2
print(ans)


from collections import Counter
s = 0

def func(t):
	t = int(t)
	global s
	if t == 0:
		s = s + 1
		return 0
	if t <= -1:
		s = s - 1 - t
		return -1
	else:
		s = s + abs(t - 1)
		return 1
input()
z = Counter(map(func, input().split(' ')))
if z[-1] % 2 == 1:
	if not z[0]:
		s = s + 2
print(s)


_ = input()
n = list(map(int, input().split()))
delta = [[abs(x + 1), abs(x - 1)] for x in n]
dp = [[0, 0] for _ in n]
dp[0] = delta[0]
for x in range(1, len(n)):
	dp[x][0] = min(dp[x - 1][0] + delta[x][1], dp[x - 1][1] + delta[x][0])
	dp[x][1] = min(dp[x - 1][0] + delta[x][0], dp[x - 1][1] + delta[x][1])
print(dp[len(n) - 1][1])


n = int(input())
li = list(map(int, input().split()))
neg = 0
zer = 0
ans = 0
for i in li:
	if i < 0:
		neg += 1
		ans += -1 - i
	elif i > 0:
		ans += i - 1
	else:
		zer += 1
		ans += 1
if zer == 0:
	if neg % 2 == 1:
		ans += 2
print(ans)


n = int(input())
l = list(map(int, input().split()))
c = 0
x = 0
y = 0
for i in range(n):
	if l[i] > 0:
		c += l[i] - 1
	if l[i] < 0:
		c += abs(l[i]) - 1
		y += 1
	if l[i] == 0:
		x += 1
if x > 0:
	c += x
if y % 2 != 0 and x == 0:
	c += 2
print(c)


user_input = int(input())
list_of_ints = input().split()
for i in range(len(list_of_ints)):
	list_of_ints[i] = int(list_of_ints[i])
number_of_negatives = 0
number_of_positives = 0
number_of_zeroes = 0
coins_needed = 0
for i in range(len(list_of_ints)):
	if list_of_ints[i] < 0:
		number_of_negatives += 1
		coins_needed += list_of_ints[i] * -1 - 1
	elif list_of_ints[i] > 0:
		number_of_positives += 1
		coins_needed += list_of_ints[i] - 1
	else:
		number_of_zeroes += 1
if number_of_zeroes == 0:
	if number_of_negatives % 2 != 0:
		coins_needed += 2
else:
	coins_needed += number_of_zeroes
print(coins_needed)


from functools import reduce
t = int(input())
a = []
b = []
[a.append(int(x)) for x in input().split()]
cnt = int()
neg = int()
for i in a:
	if i < 0:
		cnt += -1 - i
		i = -1
		neg += 1
		b.append(i)
	elif i > 1:
		cnt += i - 1
		i = 1
		b.append(i)
for i in a:
	if i == 0:
		if neg % 2 != 0:
			i = -1
			neg += 1
			cnt += 1
		else:
			i = 1
			cnt += 1
		b.append(i)
result2 = reduce(lambda x, y: x * y, b)
if result2 != 1:
	cnt += 2
print(cnt)


n = int(input())
a = [int(i) for i in input().split()]
negative = 0
positive = 0
zero = 0
ans = 0
for num in a:
	if num >= 1:
		positive += 1
		ans += num - 1
	elif num <= -1:
		negative += 1
		ans += -(num + 1)
	else:
		zero += 1
if negative % 2 == 0 or zero > 0:
	print(ans + zero)
else:
	print(ans + 2)


n = int(input())
a = [int(i) for i in input().split(' ')]
value = 0
sign = 1
a = sorted(a)
for (j, i) in enumerate(a):
	if j == n - 1:
		if i == 0:
			value += 1
			continue
		if sign == i / abs(i):
			value += abs(i) - 1
		else:
			value += abs(i) + 1
	elif i < 0:
		value += abs(i + 1)
		sign *= -1
	elif i > 0:
		value += i - 1
	elif i == 0:
		value += 1
		sign = 1
print(value)


na = int(input())
a = list(map(int, input().split()))
b = []
neg = 0
zero = 0
for i in range(0, na):
	if a[i] == 1:
		b.append(0)
	elif a[i] == -1:
		b.append(0)
		neg = neg + 1
	elif a[i] == 0:
		b.append(1)
		zero = zero + 1
	elif a[i] < 0:
		b.append(abs(a[i]) - 1)
		neg = neg + 1
	else:
		b.append(a[i] - 1)
total = 0
if neg % 2 != 0:
	if zero >= 1:
		total = sum(b)
	else:
		total = sum(b) + 2
else:
	total = sum(b)
print(total)


import math

def solve(x):
	(m1, m2) = (10, 0)
	while x > 0:
		y = x % 10
		x //= 10
		m1 = min(m1, y)
		m2 = max(m2, y)
	return m1 * m2
try:
	t = 1
	while t > 0:
		t -= 1
		n = int(input())
		(count, zeroes, ans) = (0, 0, 0)
		l = list(map(int, input().split()))
		for i in l:
			if i <= -1:
				count += 1
				ans += abs(i) - 1
			elif i == 0:
				zeroes += 1
			else:
				ans += i - 1
		ans += zeroes
		if count % 2 != 0:
			if zeroes > 0:
				print(ans)
			else:
				print(ans + 2)
		else:
			print(ans)
except:
	pass


n = int(input())
ls = list(map(int, input().split()))
ans = 0
neg = 0
zero = 0
for i in ls:
	if i == 0:
		ans += 1
		zero += 1
	elif i < 0:
		ans += abs(i) - 1
		neg += 1
	else:
		ans += i - 1
if neg % 2 == 1 and zero > 0:
	print(ans)
elif neg % 2 == 1:
	print(ans + 2)
else:
	print(ans)


import sys
mod = 1000000007

def get_array():
	return list(map(int, sys.stdin.readline().split()))

def get_ints():
	return map(int, sys.stdin.readline().split())

def input():
	return sys.stdin.readline()

def main():
	k = int(input())
	a = get_array()
	s = 0
	(n, p, z) = ([], [], [])
	(x, y) = (0, 0)
	for i in range(k):
		if a[i] < 0:
			n.append(a[i])
			x += 1
		elif a[i] == 0:
			z.append(a[i])
			y += 1
		else:
			p.append(a[i])
	for e in p:
		s += e - 1
	if x > 0:
		for e in n:
			s += abs(e + 1)
		if x % 2 == 1:
			if y == 0:
				s += 2
	s += y
	print(s)
main()


n = int(input())
a1 = list(map(int, input().split()))
neg = 0
pos = 0
cost = 0
zer = 0
for i in a1:
	if i < 0:
		neg = neg + 1
	elif i == 0:
		zer = zer + 1
	cost = cost + abs(abs(i) - 1)
pos = n - (neg + zer)
if zer == 0:
	if neg % 2 == 0:
		print(cost)
	else:
		print(str(cost + 2))
else:
	print(cost)


n = int(input())
array_numbers = input().split(' ')
negative_numbers = []
positive_numbers = []
amount_negatives = 0
amount_positives = 0
coins = 0
for i in range(n):
	array_numbers[i] = int(array_numbers[i])
	number = array_numbers[i]
	if number < 0:
		amount_negatives += 1
		negative_numbers.append(number)
	elif number > 0:
		amount_positives += 1
		positive_numbers.append(number)
	else:
		coins += 1
negative_numbers.sort(reverse=True)
positive_numbers.sort()
if amount_negatives % 2 != 0 and coins < 1:
	coins += (negative_numbers[0] - 1) * -1
	for i in range(1, amount_negatives):
		coins += (negative_numbers[i] - -1) * -1
else:
	for i in range(amount_negatives):
		coins += (negative_numbers[i] - -1) * -1
for i in range(amount_positives):
	coins += positive_numbers[i] - 1
print(coins)


n = int(input())
kq = 0
d = 1
k = 0
a = [int(i) for i in input().split()]
for i in range(n):
	if abs(a[i] + 1) < abs(a[i] - 1):
		kq += abs(a[i] + 1)
		d *= -1
	else:
		kq += abs(a[i] - 1)
	if a[i] == 0:
		k += 1
if d == 1 or k > 0:
	print(str(kq))
else:
	print(str(kq + 2))


n = int(input())
a = [int(x) for x in input().split()]
dpone = [0 for i in range(len(a))]
dpnegone = [0 for i in range(len(a))]
dpone[0] = abs(a[0] - 1)
dpnegone[0] = abs(a[0] + 1)
for i in range(1, len(a)):
	dpone[i] = min(dpone[i - 1] + abs(a[i] - 1), dpnegone[i - 1] + abs(a[i] + 1))
	dpnegone[i] = min(dpone[i - 1] + abs(a[i] + 1), dpnegone[i - 1] + abs(a[i] - 1))
print(dpone[-1])


from functools import reduce
n = int(input())
l = list(map(int, input().split()))
a = []
c = 0
for i in l:
	if i == 0:
		i = i + 1
		c = c + 1
		a.append(i)
	elif i == 1:
		a.append(i)
	elif i == -1:
		a.append(i)
	elif i < -1:
		c = c + abs(i + 1)
		i = i + abs(i + 1)
		a.append(i)
	elif i > 1:
		c = c + (i - 1)
		i = i - abs(i - 1)
		a.append(i)
q = reduce(lambda x, y: x * y, a)
if q == -1 and l.count(0) == 0:
	c = c + 2
print(c)


n = int(input())
a = [int(i) for i in input().split()]
count = 0
prod = 1
for i in a:
	if i < 0:
		count += -1 - i
		prod *= -1
	elif i > 0:
		count += i - 1
	else:
		count += 1
if prod == -1:
	if 0 not in a:
		count += 2
print(count)


def run(arr):
	count = 0
	num_of_neg_one = 0
	num_of_zero = 0
	for num in arr:
		if num > 1:
			count += num - 1
		elif num < 0:
			count += abs(num) - 1
			num_of_neg_one += 1
		elif num == 0:
			num_of_zero += 1
			count += 1
	if num_of_neg_one % 2 == 0:
		pass
	elif num_of_zero > 0:
		pass
	else:
		count += 2
	print(count)
input()
arr = list(map(int, input().split()))
run(arr)


n = int(input())
a = list(map(int, input().split()))
ans = 0
b = []
for elem in a:
	if elem >= 1:
		ans += elem - 1
		b.append(1)
	elif elem <= -1:
		ans += -1 - elem
		b.append(-1)
	else:
		b.append(0)
c = b.count(-1)
if c % 2 == 0:
	print(ans + b.count(0))
else:
	c = b.count(0)
	if c != 0:
		print(ans + c)
	else:
		print(ans + 2)


n = int(input())
x = list(map(int, input().split()))
l = x.copy()
nc = 0
m = -1000000000
for i in range(n):
	if l[i] < 0:
		nc = nc + 1
		m = max(m, l[i])
	l[i] = abs(abs(l[i]) - 1)
if nc % 2 == 0:
	print(sum(l))
elif 0 in x:
	print(sum(l))
else:
	print(sum(l) + 2)


n = int(input())
sp = list(map(int, input().split()))
sp.sort()
kol = 0
ans = 0
for i in range(len(sp)):
	if sp[i] <= 0:
		if i < len(sp) - 1 and (sp[i + 1] >= 0 and kol % 2 != 0 or sp[i + 1] <= 0):
			ans += abs(sp[i] + 1)
			kol += 1
		elif i < len(sp) - 1 and sp[i + 1] >= 0 and (kol % 2 == 0):
			ans += abs(sp[i]) + 1
		elif i == len(sp) - 1 and kol % 2 == 0:
			ans += abs(sp[i]) + 1
		elif i == len(sp) - 1 and kol % 2 == 1:
			ans += abs(sp[i] + 1)
			kol += 1
	else:
		ans += sp[i] - 1
print(ans)


n = int(input())
a = [int(i) for i in input().split()]
even = 0
odd = 0
for a_i in a:
	even += 1 if a_i >= 0 else 0
	odd += 1 if a_i < 0 else 0
total_coins = 0
if even % 2 == 0 and odd % 2 == 0 or (even % 2 == 1 and odd % 2 == 0):
	for a_i in a:
		if a_i != 1 and a_i != -1:
			total_coins += min(abs(a_i + 1), abs(a_i - 1))
elif even % 2 == 0 and odd % 2 == 1 or (even % 2 == 1 and odd % 2 == 1):
	flag = 0
	for a_i in a:
		if a_i != 1 and a_i != -1:
			total_coins += min(abs(a_i + 1), abs(a_i - 1))
			if a_i == 0 and flag == 0:
				total_coins -= 2
				flag = 1
	total_coins += 2
print(total_coins)


n = int(input())
nums = sorted(list(map(int, input().split())))
ideal = 0
countNeg = 0
for i in range(n):
	if nums[i] > 0:
		ideal += nums[i] - 1
	elif nums[i] < 0:
		ideal += abs(-1 - nums[i])
		countNeg += 1
	else:
		ideal += 1
if countNeg % 2 != 0 and 0 not in nums:
	ideal += 2
print(ideal)


n = int(input())
arr = list(map(int, input().strip().split()))[:n]
neg = 0
zero = 0
ans = 0
for num in arr:
	if num == 0:
		zero += 1
	elif num < 0:
		neg += 1
		ans += abs(num) - 1
	else:
		ans += num - 1
if zero > 0:
	print(ans + zero)
elif neg % 2 != 0:
	print(ans + 2)
else:
	print(ans)


n = int(input())
ar = list(map(int, input().split()))
ans = 0
negative = 0
zero = 0
for i in ar:
	if i < 0:
		ans += abs(-1 - i)
		negative += 1
	elif i > 0:
		ans += abs(1 - i)
	else:
		ans += 1
		zero += 1
if negative % 2 != 0:
	if zero == 0:
		ans += 2
print(ans)


n = int(input())
l = list(map(int, input().split()))
(m, o, z, c) = (0, 0, 0, 0)
for i in l:
	if i > 0:
		o += 1
		c += i - 1
	elif i < 0:
		m += 1
		c += -1 - i
	else:
		z += 1
if m % 2 == 1 and z == 0:
	z = 2
print(z + c)


n = int(input())
a = [*map(int, input().split())]
n = []
p = []
for i in a:
	if i >= 0:
		p.append(abs(1 - i))
	else:
		n.append(abs(-1 - i))
ans = sum(p) + sum(n)
if len(n) & 1:
	if 0 not in a:
		ans += 2
print(ans)


n = int(input())
l = list(map(int, input().split()))
ln = []
lp = []
for i in l:
	if i < 0:
		ln.append(i)
	else:
		lp.append(i)
if len(ln) % 2 != 0:
	if 0 in lp:
		ln.append(0)
		lp.remove(0)
co = 0
for i in lp:
	co += abs(i - 1)
for i in ln:
	co += abs(i + 1)
if len(ln) % 2 != 0:
	co += 2
print(co)


num = int(input())
input_a = input()
input_array = input_a.split(' ')
input_array_int = []
for i in input_array:
	input_array_int.append(int(i))
count = 0
count_neg = 0
count_pos = 0
zero_present = False
for i in input_array_int:
	if i <= -1:
		count = count + abs(i + 1)
		count_neg = count_neg + 1
	elif i >= 1:
		count = count + abs(i - 1)
		count_pos = count_pos + 1
	else:
		count = count + 1
		zero_present = True
if zero_present == True:
	count = count
elif count_neg % 2 == 1:
	count = count + 2
else:
	count = count
print(count)


n = int(input())
a = list(map(int, input().split()))
cnt_pos = 0
cnt_neg = 0
cnt_zero = 0
cost = 0
for i in range(n):
	if a[i] > 0:
		cnt_pos += 1
		cost += a[i] - 1
	elif a[i] < 0:
		cnt_neg += 1
		cost += -a[i] - 1
cnt_zero = n - cnt_pos - cnt_neg
if cnt_neg % 2 == 0 or cnt_zero != 0:
	print(cost + cnt_zero)
else:
	print(cost + cnt_zero + 2)


import sys
f = sys.stdin
n = int(f.readline())
a = list(map(int, f.readline().rstrip().split()))
b = []
count1 = 0
count2 = 0
count3 = 0
for i in range(n):
	if a[i] < 0:
		b.append(abs(-1 - a[i]))
		count1 += 1
	elif a[i] == 0:
		count3 += 1
	else:
		b.append(abs(1 - a[i]))
		count2 += 1
if count3 > 0:
	if count1 % 2 == 1:
		count1 += 1
if count1 % 2 == 1:
	print(sum(b) + 2 + count3)
else:
	print(sum(b) + count3)


n = int(input())
a = list(map(int, input().split()))
c = 0
neg = 0
z = True
for e in a:
	c += abs(e) - 1
	if e == 0:
		c += abs(e) + 2
		z = False
	if e < 0:
		neg += 1
if neg >= 1 and neg % 2 != 0 and z:
	c += 2
print(c)


input()
(b, c, d, e, f) = (0, 0, 0, 0, 0)
for _ in map(int, input().split()):
	if _ == 0:
		b += 1
	elif _ > 0:
		c += 1
		d += _ - 1
	elif _ < 0:
		e += 1
		f += -1 + -1 * _
print(b + d + f + [2, 0][e % 2 == 0 or (e % 2 != 0 and b > 0)])


n = int(input())
nums = dict(zero=0, minus1=0)
ans = 0
for i in input().split():
	num = int(i)
	if num >= 1:
		ans += num - 1
	elif num == 0:
		nums['zero'] += 1
	elif num == -1:
		nums['minus1'] += 1
	else:
		ans += -1 - num
		nums['minus1'] += 1
if nums['minus1'] % 2 != 0:
	if nums['zero'] > 0:
		ans += 1
		nums['zero'] -= 1
	else:
		ans += 2
ans += nums['zero']
print(ans)


n = int(input())
arr = list(map(int, input().split()))
arr.sort()
ans = 0
countn = 0
count0 = 0
for i in range(n):
	if arr[i] < 0:
		countn += 1
		ans += -1 - arr[i]
	elif arr[i] > 0:
		ans += arr[i] - 1
	else:
		count0 += 1
if countn % 2 != 0:
	if count0 > 0:
		ans += count0
		count0 = 0
	else:
		ans += 2
ans += count0
print(ans)


n = int(input())
a = list(map(int, input().split(' ')))
ans = 0
nz = 0
np = 0
nn = 0
nm = 0
for i in range(n):
	if a[i] == 0:
		nz += 1
	elif a[i] < -1:
		nn += 1
		ans = ans + (-1 - a[i])
	elif a[i] > 1:
		np += 1
		ans = ans + (a[i] - 1)
	elif a[i] == -1:
		nm += 1
if (nm + nn) % 2 != 0:
	if nz == 0:
		ans = ans + 2
ans = ans + nz
print(ans)


n = input()
B = list(map(int, input().split(' ')))
count_0 = 0
count_M1 = 0
ans = 0
for i in B:
	if i == 0:
		count_0 += 1
	elif i == -1:
		count_M1 += 1
	elif i == 1:
		pass
	elif i < -1:
		temp = -(i + 1)
		ans += temp
		count_M1 += 1
	elif i > 1:
		temp = i - 1
		ans += temp
if count_M1 % 2 == 0:
	ans += count_0
elif count_0 != 0:
	ans += count_0
else:
	ans += 2
print(ans)


def count_coins(a):
	minus_curr = abs(a[0] + 1)
	plus_curr = abs(a[0] - 1)
	for i in range(1, len(a)):
		plus = abs(a[i] - 1)
		minus = abs(a[i] + 1)
		b1 = min(plus_curr + plus, minus_curr + minus)
		b2 = min(plus_curr + minus, minus_curr + plus)
		plus_curr = b1
		minus_curr = b2
	return plus_curr

def main():
	_ = input()
	array = list(map(int, input().split(' ')))
	result = count_coins(array)
	print(result)
main()


def c():
	_ = input()
	arr = list(map(int, input().split()))
	pos = 0
	neg = 0
	zero = 0
	coins = 0
	for i in arr:
		if i == 0:
			zero += 1
		elif i < 0:
			neg += 1
			coins -= 1 + i
		else:
			pos += 1
			coins += i - 1
	if neg % 2 == 0:
		coins += zero
	elif zero > 0:
		coins += zero
	else:
		coins += 2
	print(coins)
c()


n = int(input())
l = [int(x) for x in input().split()]
minus = 0
plus = 0
count = 0
for i in l:
	if i == -1:
		minus += 1
	elif i < 0:
		minus += 1
		count += abs(i) - 1
	elif i == 1:
		plus += 1
	elif i > 0:
		plus += 1
		count += i - 1
	elif i == 0:
		count += 1
if 0 not in l and minus % 2 == 1:
	count += 2
print(count)


n = int(input())
listA = [int(x) for x in input().split()]
count = 0
count_zero = 0
count_zero = listA.count(0)
for i in listA:
	if i < 0:
		count += 1
coin = 0
for i in listA:
	if i < 0:
		coin = coin + (-1 - i)
	elif i == 0:
		coin = coin + 1
	else:
		coin = coin + (i - 1)
if count % 2 != 0:
	if count_zero == 0:
		coin = coin + 2
print(coin)


n = int(input())
a = map(int, input().split())
s = s1 = s2 = s3 = 0
for i in a:
	if i >= 1:
		s += 1
		s3 += i - 1
	elif i <= -1:
		s1 += 1
		s3 += abs(i) - 1
	elif i == 0:
		s2 += 1
if s2 == 0:
	print(s3 + 2 + s2 if s1 % 2 != 0 and s1 != 0 else s3 + s2)
else:
	print(s3 + 2 + s2 if s2 - (s1 - (s1 - 1)) < 0 and s != 0 else s3 + s2)


n = int(input())
zero_cnt = 0
neg_cnt = 0
coins_spent = 0

def convert_int(*args):
	global zero_cnt
	global neg_cnt
	for arg in args:
		if int(arg) == 0:
			zero_cnt += 1
			return int(arg)
		elif int(arg) < 0:
			neg_cnt += 1
			return int(arg)
		else:
			return int(arg)
nums = list(map(convert_int, input().split()))
for num in nums:
	if num < 0:
		coins_spent += abs(num + 1)
	if num > 0:
		coins_spent += num - 1
if zero_cnt > 0:
	coins_spent += zero_cnt
if zero_cnt == 0:
	if neg_cnt % 2 != 0:
		coins_spent += 2
print(coins_spent)


n = int(input())
a = list(map(int, input().split()))
ans = 0
(pol, otr, zeros) = (0, 0, 0)
for i in range(n):
	if a[i] > 0:
		ans += a[i] - 1
		pol += 1
	elif a[i] < 0:
		ans -= a[i] + 1
		otr += 1
	else:
		zeros += 1
if otr % 2 == 1 and zeros == 0:
	print(ans + 2)
else:
	print(ans + zeros)


n = int(input())
list1 = list(map(int, input().split()))
sum1 = 0
neg = 0
zer = 0
for i in range(n):
	if list1[i] < 0:
		sum1 += abs(list1[i] + 1)
		neg += 1
	elif list1[i] == 0:
		zer += 1
	else:
		sum1 += abs(list1[i] - 1)
if neg % 2 == 0:
	print(sum1 + zer)
elif zer > 0:
	print(sum1 + zer)
else:
	print(sum1 + 2)


n = int(input())
neg = 0
a = [int(i) for i in input().split()]
pos = 0
buff = 0
ans = 0
for i in a:
	if i < 0:
		ans += abs(i + 1)
		neg += 1
	elif i == 0:
		buff += 1
	else:
		ans += abs(i - 1)
		pos += 1
if buff == 0:
	if neg % 2 == 0:
		print(ans)
	else:
		print(ans + 2)
elif neg % 2 == 0:
	print(ans + buff)
else:
	print(ans + buff)


n = int(input())
a = [int(s) for s in input().split(' ')]
(neg, zero, pos) = (0, 0, 0)
sm = 0
for i in a:
	if i == 0:
		zero += 1
	elif i > 0:
		pos += 1
	else:
		neg += 1
	sm += abs(abs(i) - 1)
if neg % 2 == 0:
	print(sm)
elif zero > 0:
	print(sm)
else:
	print(sm + 2)


def findsteps(a):
	steps = 0
	plus = 0
	minus = 0
	zeros = 0
	for elem in a:
		if elem > 0:
			steps += elem - 1
			plus += 1
		elif elem < 0:
			steps += abs(elem) - 1
			minus += 1
		else:
			zeros += 1
	if zeros == 0:
		if minus % 2 != 0:
			steps += 2
	else:
		steps += zeros
	return steps
n = int(input())
a = list(map(int, input().split()))
print(findsteps(a))


from sys import stdin

def solve():
	n = int(input())
	A = [int(i) for i in stdin.readline().split()]
	c = 0
	zero = False
	pos = True
	for i in range(len(A)):
		if A[i] > 0:
			c += A[i] - 1
		elif A[i] < 0:
			c += -1 - A[i]
			if pos == True:
				pos = False
			else:
				pos = True
		else:
			c += 1
			zero = True
	if zero:
		pass
	elif pos == False:
		c += 2
	return c
print(solve())


from sys import stdin, stdout
cin = stdin.readline
cout = stdout.write
mp = lambda : list(map(int, cin().split()))

def chars():
	s = cin()
	return list(s[:len(s) - 1])

def pl(a):
	for val in a:
		cout(val + '\n')
(n,) = mp()
a = mp()
ans = 0
count = 0
zero = 0
for i in range(n):
	if a[i] <= -1:
		ans += -1 - a[i]
		count += 1
	else:
		if not a[i]:
			zero += 1
		ans += abs(1 - a[i])
if count % 2:
	if not zero:
		ans += 2
cout(str(ans))


n = int(input())
a = list(map(int, input().split()))
is_ = False
p = 0
m = 0
for i in a:
	if i > 0:
		m += i - 1
	elif i < 0:
		m += -i - 1
		if not is_:
			is_ = True
		else:
			is_ = False
	else:
		m += 1
		p += 1
if is_ and p < 1:
	print(m + 2)
else:
	print(m)


N = int(input())
numbers = list(map(int, input().split()))
cost = 0
product = 1
haszero = False
for num in numbers:
	if num == 0:
		cost += 1
		haszero = True
	else:
		sign = num // abs(num)
		product *= sign
		cost += abs(num) - 1
if product == -1:
	if not haszero:
		cost += 2
print(cost)


input()
p = 1
coins = 0
k0 = 0
for elem in list(map(int, input().split())):
	if elem >= 1:
		coins += elem - 1
		elem = 1
	elif elem <= -1:
		coins += -1 - elem
		elem = -1
	elif elem == 0:
		coins += 1
		elem = 1
		k0 += 1
	p *= elem
if p == 1:
	print(coins)
elif p == -1:
	if k0 >= 1:
		print(coins)
	else:
		print(coins + 2)


n = int(input())
a = [int(x) for x in input().split()]
zeroCount = 0
negCount = 0
ans = 0
for i in range(n):
	if a[i] == 0:
		zeroCount = zeroCount + 1
		ans += 1
	elif a[i] < 0:
		negCount = negCount + 1
		ans += -1 - a[i]
	else:
		ans += a[i] - 1
if zeroCount > 0 or negCount % 2 == 0:
	print(ans)
else:
	ans = ans + 2
	print(ans)


n = int(input())
arr = [int(i) for i in input().split()]
n1 = 0
n2 = 0
n3 = 0
ans = 0
for i in arr:
	if i > 0:
		n1 += 1
		ans += i - 1
	elif i == 0:
		n2 += 1
		ans += 1
	else:
		n3 += 1
		ans += -1 - i
if n3 % 2 == 0 or n2 > 0:
	print(ans)
else:
	print(ans + 2)


n = int(input())
l = list(map(int, input().split()))
s = 0
c = 0
c1 = 0
for i in range(n):
	if l[i] < 0:
		s = s + abs(-1 - l[i])
		c += 1
	else:
		s = s + abs(1 - l[i])
	if l[i] == 0:
		c1 = 1
if c % 2 != 0:
	if c1 == 1:
		print(s)
	else:
		print(s + 2)
else:
	print(s)


n = int(input())
a = list(map(int, input().split()))
sign = result = zeros = 0
for i in a:
	if i < 0:
		sign += 1
		result += -1 - i
	elif i == 0:
		zeros += 1
		result += abs(i - 1)
	else:
		result += abs(i - 1)
if sign % 2 == 1 and zeros == 0:
	result += 2
print(result)


n = int(input())
a = list(map(int, input().split()))
p = 0
v = 0
ans = 0
for i in range(n):
	if a[i] < 0:
		ans += -1 - a[i]
		p += 1
	elif a[i] > 0:
		ans += a[i] - 1
	else:
		v += 1
if p % 2 == 0:
	ans += v
elif v == 0:
	ans += 2
else:
	ans += v
print(ans)


from sys import stdin
import heapq

def find_max(n, m, arr):
	pque = [0] * len(arr)
	for i in range(len(arr)):
		pque[i] = -arr[i]
	heapq.heapify(pque)
	ans = 0
	while n > 0:
		cur_max = -heapq.heappop(pque)
		ans += cur_max
		cur_max -= 1
		if cur_max > 0:
			heapq.heappush(pque, -cur_max)
		n -= 1
	return ans

def find_min(n, m, arr):
	pque = arr[:]
	heapq.heapify(pque)
	ans = 0
	while n > 0:
		cur_min = heapq.heappop(pque)
		ans += cur_min
		cur_min -= 1
		if cur_min > 0:
			heapq.heappush(pque, cur_min)
		n -= 1
	return ans

def solution(n, m, arr):
	mn = find_min(n, m, arr)
	mx = find_max(n, m, arr)
	return [mx, mn]
n = int(stdin.readline().strip())
arr = list(map(int, stdin.readline().split()))
ans = 0
for i in range(n):
	if arr[i] < 0:
		ans += abs(arr[i] - -1)
		arr[i] = -1
	elif arr[i] > 0:
		ans += abs(arr[i] - 1)
		arr[i] = 1
	else:
		pass
zero = arr.count(0)
m_one = arr.count(-1)
if m_one % 2 == 0:
	ans += zero
elif zero > 0:
	ans += 1
	zero -= 1
	ans += zero
else:
	ans += 2
print(ans)


k1 = []
neg = 0
n = int(input())
k = list(map(int, input().strip().split()[:n]))
p = False
for x in k:
	if x < 0:
		k1.append(abs(-1 - x))
		neg += 1
	else:
		k1.append(abs(x - 1))
	if x == 0:
		p = True
if neg % 2 == 0:
	print(sum(k1))
elif p == True:
	print(sum(k1))
else:
	print(sum(k1) + 2)


mod = 10 ** 9 + 7

def ria():
	return [int(i) for i in input().split()]
n = ria()[0]
ar = ria()
ar.sort()
sm = 0
for i in ar:
	sm += abs(i - 1)
mn = sm
for i in range(1, n, 2):
	if ar[i] > 0:
		sm += 2
	elif ar[i] < 0:
		sm -= 2
	if ar[i - 1] > 0:
		sm += 2
	elif ar[i - 1] < 0:
		sm -= 2
	mn = min(sm, mn)
print(mn)


n = int(input())
a = [int(x) for x in input().split()]
cn = 0
cz = 0
ans = 0
for i in range(n):
	if a[i] < 0:
		cn += 1
		ans += a[i] * -1 - 1
	elif a[i] > 0:
		ans += a[i] - 1
	else:
		ans += 1
		cz += 1
if cn % 2 == 1 and cz == 0:
	ans += 2
print(ans)


n = int(input())
a = list(map(int, input().split()))
c = 0
pos = 0
neg = 0
m1 = -10000000000
m2 = 10000000000
for i in range(n):
	if a[i] <= 0:
		neg += 1
		c += abs(abs(a[i]) - 1)
		m1 = max(m1, a[i])
	else:
		pos += 1
		c += a[i] - 1
		m2 = min(m2, a[i])
if neg % 2 == 0:
	print(c)
else:
	c1 = c - abs(abs(m1) - 1) + abs(m1 - 1)
	if m2 < 10000000000:
		c2 = c - (m2 - 1) + (m2 + 1)
		print(min(c1, c2))
	else:
		print(c1)


n = int(input())
a = list(map(int, input().split()))
a = sorted(a)
count = odd = 0
i = 0
while i < n:
	if a[i] < 0:
		odd += 1
		count += -1 - a[i]
		a[i] = -1
	elif a[i] > 0:
		if odd % 2 != 0:
			odd += 1
			count += 2
		count += a[i] - 1
		a[i] = 1
	else:
		if odd % 2 != 0:
			odd += 1
		count += 1
	i += 1
if odd % 2 == 0:
	print(count)
else:
	print(count + 2)


from sys import stdin
from math import gcd, sqrt, log10, log2

def ii():
	return int(stdin.readline())

def mi():
	return map(int, stdin.readline().split())

def li():
	return list(mi())
n = ii()
a = li()
x = m = 0
for i in a:
	if i < 0:
		x += abs(i + 1)
		m += 1
	else:
		x += abs(i - 1)
if m % 2 and (not 0 in a):
	x += 2
print(x)


(n, a, res, x, y) = (int(input()), list(map(int, input().split())), 0, 0, 0)
for i in a:
	if i < 0:
		res += abs(i) - 1
		x += 1
	elif i > 0:
		res += i - 1
	else:
		res += 1
		y += 1
if x & 1 and y == 0:
	res += 2
print(res)


import sys, math
from collections import deque, defaultdict
import operator as op
from functools import reduce
sys.setrecursionlimit(10 ** 6)
I = sys.stdin.readline

def ii():
	return int(I().strip())

def li():
	return list(map(int, I().strip().split()))

def mi():
	return map(int, I().strip().split())

def ncr(n, r):
	r = min(r, n - r)
	numer = reduce(op.mul, range(n, n - r, -1), 1)
	denom = reduce(op.mul, range(1, r + 1), 1)
	return numer // denom

def gcd(x, y):
	while y:
		(x, y) = (y, x % y)
	return x

def divi(n):
	cnt = 0
	for i in range(2, int(n ** 0.5) + 1):
		if n % i == 0:
			if i == n // i:
				cnt += 1
			else:
				cnt += 2
	return cnt

def main():
	n = ii()
	arr = li()
	cnt = 0
	zeros = 0
	pos = 0
	neg = 0
	for i in arr:
		if i != 0:
			if i < 0:
				neg += 1
			else:
				pos += 1
			cnt += abs(i) - 1
		else:
			zeros += 1
	cnt += zeros
	if neg % 2:
		if zeros == 0:
			cnt += 2
	print(cnt)
main()


from math import fabs
n = int(input())
A = input().split(' ')
for i in range(0, n):
	A[i] = int(A[i])
ans = 0
zeroCount = False
for i in range(0, n):
	if A[i] < 0:
		ans += abs(abs(A[i]) - 1)
		A[i] = -1
	elif A[i] == 0:
		ans += 1
		zeroCount = True
	else:
		ans += abs(abs(A[i]) - 1)
		A[i] = 1
negCount = 0
for i in range(0, n):
	if A[i] < 0:
		negCount += 1
ans = abs(int(ans))
if negCount % 2 == 0:
	print(ans)
elif zeroCount:
	print(ans)
else:
	print(ans + 2)


(n, nums) = (int(input()), list(map(int, input().split())))
has_zero = False
operations = 0
final = 1
for i in nums:
	if i == 0:
		has_zero = True
		operations += 1
	if i > 0:
		operations += i - 1
	if i < 0:
		operations += -1 - i
		final *= -1
if has_zero:
	print(operations)
elif final == 1:
	print(operations)
elif final == -1 and has_zero:
	print(operations)
else:
	print(operations + 2)


n = int(input())
a = list(map(int, input().split()))
(n, z) = (0, 0)
s = sum(map(abs, a)) - len(a)
for i in a:
	if i < 0:
		n += 1
	elif i == 0:
		z += 1
s += z * 2
if z == 0 and n % 2:
	s += 2
print(s)


n = int(input())
a = map(int, input().split())
Sum = 0
cnt = [0, 0]
for x in a:
	if x >= 1:
		Sum += x - 1
	if x <= -1:
		Sum += -1 - x
		cnt[1] += 1
	if x == 0:
		cnt[0] += 1
		Sum += 1
print(Sum + 2 * (cnt[1] % 2 and cnt[0] == 0))


n = int(input())
a = list(map(int, input().split()))
ne = 0
p = 0
cz = 0
ans = 0
for i in range(n):
	if a[i] < 0:
		ne += 1
		ans += -a[i] - 1
	elif a[i] > 0:
		p += 1
		ans += a[i] - 1
	else:
		cz += 1
		ans += 1
if ne % 2 != 0 and cz == 0:
	ans += 2
print(ans)


n = int(input())
a = [int(i) for i in input().split()]
count = 0
nr1 = 0
ok = 0
for i in range(n):
	if a[i] == 0:
		ok += 1
	elif a[i] < 0:
		nr1 += 1
		count += -1 - a[i]
		a[i] = -1
	else:
		count += a[i] - 1
		a[i] = 1
if ok:
	count += ok
elif nr1 & 1:
	count += 2
print(count)


n = int(input())
a = list(map(int, input().split()))
b1 = 0
b2 = 0
z = 0
t = 0
for i in range(n):
	if a[i] < 0:
		b1 = b1 + 1
	if a[i] == 0:
		z = z + 1
	if a[i] > 0:
		b2 = b2 + 1
for i in range(n):
	if a[i] < 0:
		t = t + abs(a[i] + 1)
	if a[i] > 0:
		t = t + (a[i] - 1)
	if a[i] == 0:
		t = t + 1
if b1 % 2 != 0 and z == 0:
	print(t + 2)
else:
	print(t)


n = int(input())
arr = list((int(c) for c in input().split()))
turn = 0
sgn = 1
zeros = 0
for v in arr:
	if v < 0:
		turn += -1 - v
		sgn *= -1
	elif v > 0:
		turn += v - 1
	else:
		turn += 1
		zeros += 1
if zeros == 0 and sgn == -1:
	turn += 2
print(turn)


n = int(input())
out = 0
a = list(map(int, input().split()))
b = set(a)
if 0 in b:
	b.remove(0)
if 1 in b:
	b.remove(1)
if -1 in b:
	b.remove(-1)
if len(b) > 0:
	for i in range(len(a)):
		if a[i] < -1:
			out += -1 - a[i]
			a[i] = -1
		elif a[i] > 1:
			out += a[i] - 1
			a[i] = 1
if a.count(-1) % 2 == 1:
	if 0 in a:
		out += a.count(0)
	else:
		out += 2
else:
	out += a.count(0)
print(out)


n = int(input())
a = list(map(int, input().split()))
a = sorted(a)
b = [0] * n
for i in range(n):
	if a[i] == 0:
		b[i] = 0
	elif a[i] == 1 or a[i] == -1:
		b[i] = 0
	elif a[i] < -1:
		b[i] = abs(-1 - a[i])
		a[i] = -1
	else:
		b[i] = abs(a[i] - 1)
		a[i] = 1
s = sum(b)
x = a.count(0)
if a.count(-1) % 2 == 1 and x > 0:
	s += x
	print(s)
elif a.count(-1) % 2 == 1:
	s += 2
	print(s)
else:
	print(s + x)


n = int(input())
Array = list(map(int, input().split()))
coins = 0
pos = 0
neg = 0
for i in range(n):
	if Array[i] < -1:
		coins += -1 - Array[i]
		Array[i] = -1
	if Array[i] > 1:
		coins += Array[i] - 1
		Array[i] = 1

def product(list):
	p = 1
	for i in list:
		p *= i
	return p
p = product(Array)
if p == 1:
	print(coins)
	quit
elif p == -1:
	coins += 2
	print(coins)
	quit
elif p == 0:
	coins += Array.count(0)
	print(coins)
	quit


n = input()
a = input().split(' ')
A = [int(k) for k in a]
cur = [0, 0]
for i in range(int(n)):
	get_one = abs(A[i] - 1)
	get_minus_one = abs(A[i] + 1)
	new = [0, 0]
	if i == 0:
		new[0] = get_one
		new[1] = get_minus_one
	else:
		new[0] = min(cur[0] + get_one, cur[1] + get_minus_one)
		new[1] = min(cur[0] + get_minus_one, cur[1] + get_one)
	cur = new
print(cur[0])


num_int = input().split()
num_list = list(map(int, input().split()))
neg1_count = 0
num_0 = 0
steps = 0

def check_negnum1():
	global neg1_count
	for i in range(0, len(num_list)):
		if num_list[i] == -1:
			neg1_count += 1
for r in range(0, len(num_list)):
	if abs(num_list[r] - 1) < abs(num_list[r] + 1):
		steps += abs(num_list[r] - 1)
		num_list[r] = 1
	elif abs(num_list[r] - 1) > abs(num_list[r] + 1):
		steps += abs(num_list[r] + 1)
		num_list[r] = -1
	elif num_list[r] == 0:
		steps += abs(num_list[r] - 1)
		num_0 += 1
		num_list[r] = 1
check_negnum1()
if neg1_count == 1 or neg1_count % 2 == 1:
	if num_0 == 0:
		steps += 2
print(steps)


n = input()
a = [int(i) for i in input().split()]
nneg = 0
npos = 0
nzero = 0
ncoin = 0
for i in a:
	if i < 0:
		ncoin += -1 - i
		nneg += 1
	elif i > 0:
		ncoin += i - 1
		npos += 1
	else:
		ncoin += 1
		nzero += 1
if nzero == 0 and nneg % 2 == 1:
	ncoin += 2
print(ncoin)


def read_tokens():
	return input().strip().split(' ')

def read_ints():
	return [int(s) for s in read_tokens()]
import math
(n,) = read_ints()
arr = read_ints()

def solve(arr: list) -> int:
	ans = 0
	for (i, el) in enumerate(arr):
		if el < 0:
			ans += -1 - el
			arr[i] = -1
		elif el > 0:
			ans += el - 1
			arr[i] = 1
	k = sum((1 for el in arr if el == 0))
	if k > 0:
		return ans + k
	if k == 0:
		s = 1
		for el in arr:
			s *= el
		if s == 1:
			return ans
		return ans + 2
print(solve(arr))


def mp():
	return map(int, input().split())
n = int(input())
a = list(mp())
l = [i for i in a if i < 0]
m = [i for i in a if i == 0]
r = [i for i in a if i > 0]
ans = 0
for i in r:
	ans += i - 1
for i in l:
	ans += -i - 1
ans += len(m)
if len(l) % 2 != 0 and len(m) == 0:
	ans += 2
print(ans)


n = int(input())
a = list(map(int, input().split()))
(b1, b2, b3) = (0, 0, 0)
(c1, c2) = (0, 0)
for i in a:
	if i < 0:
		b1 += 1
		c1 += -1 - i
	elif i > 0:
		b2 += 1
		c2 += i - 1
	else:
		b3 += 1
if b1 % 2 == 1:
	if b3 > 0:
		print(c1 + c2 + b3)
	else:
		print(c1 + c2 + 2)
else:
	print(c1 + c2 + b3)


x = input()
test = list(map(int, input().split()))
count = sp = 0
trial = []
for i in test:
	while abs(i) != 1:
		if i < -1:
			count = count + abs(i + 1)
			i = -1
		elif i > 1:
			count = count + abs(i - 1)
			i = 1
		elif i == 0:
			count = count + 1
			i = 1
			sp = sp + 1
	trial.append(i)
x = trial.count(-1)
y = sp
if x % 2 == 0 or (x + y) % 2 == 0 or (y >= 2 and (x + y - 1) % 2 == 0):
	print(count)
else:
	print(count + 2)


R = lambda : map(int, input().split())
n = int(input())
arr = list(R())
(pos, nes) = (abs(arr[0] - 1), abs(arr[0] + 1))
for x in arr[1:]:
	(pos, nes) = (min(nes + abs(x + 1), pos + abs(x - 1)), min(nes + abs(x - 1), pos + abs(x + 1)))
print(pos)


n1 = int(input())
a = list(map(int, input().split()))

def f(A):
	tba = 0
	tbs = 0
	mv = 0
	pv = 0
	countofz = 0
	for i in range(len(A)):
		if A[i] < -1:
			tba = tba + (-1 - A[i])
			mv = mv + 1
		elif A[i] > 1:
			tbs = tbs + A[i] - 1
			pv = pv + 1
		elif A[i] == 0:
			countofz = countofz + 1
		elif A[i] == -1:
			mv = mv + 1
		elif A[i] == 1:
			pv = pv + 1
	if mv % 2 == 0 or countofz > 0:
		return tba + tbs + countofz
	else:
		return tba + tbs + 2
print(f(a))


n = int(input())
l = [int(i) for i in input().split()]
z = 0
o = 0
c = 0
for i in range(n):
	if l[i] == 0:
		z += 1
	elif l[i] < 0:
		o += 1
	if l[i] > 1 or l[i] < -1:
		c += abs(l[i]) - 1
print(z + c if o % 2 == 0 or z != 0 else z + c + 2)


n = int(input())
a = [int(x) for x in input().split()]
price = 0
if 0 in a:
	for i in range(n):
		if a[i] != 0:
			price += abs(a[i]) - 1
		else:
			price += 1
	print(price)
else:
	cnt = 0
	for i in range(n):
		price += abs(a[i]) - 1
		cnt += a[i] < 0
	print(price + 2 * (cnt % 2))


a = int(input())
a1 = list(map(int, input().split()))
cost = 0
eq = 0
pa = 0
ma = 0
for i in range(a):
	m = abs(1 + a1[i])
	p = abs(a1[i] - 1)
	if m >= p:
		cost += p
		pa += 1
	else:
		cost += m
		ma += 1
	if m == p:
		eq += 1
if ma % 2 == 0 or (ma % 2 == 1 and eq > 0):
	print(cost)
else:
	print(cost + 2)


import os

def f(arr):
	n_1 = 0
	n_0 = 0
	n_m1 = 0
	r = 0
	for a in arr:
		if a > 1:
			n_1 += 1
			r += a - 1
		elif a == 1:
			n_1 += 1
		elif a == 0:
			n_0 += 1
		elif a == -1:
			n_m1 += 1
		elif a < -1:
			r += -a - 1
			n_m1 += 1
		else:
			raise ValueError()
	if n_m1 % 2 != 0 and n_0 == 0:
		return r + n_0 + 2
	else:
		return r + n_0
if os.environ.get('DEBUG', False):
	print(f'{f([-1, 1])} = 2')
	print(f'{f([-2, 0, 2])} = 3')
	print(f'{f([0, 0, 0, 0])} = 4')
	print(f'{f([-5, -3, 5, 3, 0])} = 13')
else:
	n = int(input())
	arr = list(map(int, input().split()))
	print(f(arr))


from sys import stdin, stdout
Pi = lambda x: stdout.write(str(x) + '\n')
Ps = lambda x: stdout.write(str(x))
S = lambda x: x * (x + 1) // 2
I = lambda x: 1 + 2 * x
R = lambda : stdin.readline()
Ri = lambda x: map(int, x.split())
Rs = lambda x: map(str, x.split())
Rf = lambda x: map(float, x.split())

def main():
	for x in stdin:
		A = list(Ri(R()))
		(ans, sw, c) = (0, 0, 0)
		for a in A:
			if a == 0:
				sw = 1
				ans += 1
			if a < 0:
				c += 1
				ans += -a - 1
			if a > 0:
				ans += a - 1
		if c % 2 and sw == 0:
			ans += 2
		Pi(ans)
main()


import sys
import math
import random
input = sys.stdin.readline
n = map(int, input().split())
a = list(map(int, input().split()))
less = 0
last_less = 0
result = 0
mult = 1
i = 0
last_id = -1
for e in a:
	if e < 0:
		less += 1
		last_less = e
		last_id = i
	i += 1
if less % 2 == 0:
	for e in a:
		if e == 1 or e == -1:
			continue
		if e == 0:
			result += 1
			continue
		if e < 0:
			result += -1 - e
		else:
			result += e - 1
	print(result)
	exit()
pirveli_0 = True
for i in range(0, len(a)):
	e = a[i]
	if i == last_id:
		result += 1 - e
		continue
	if e == 1 or e == -1:
		continue
	if e == 0:
		if pirveli_0:
			result -= 1
			pirveli_0 = False
		else:
			result += 1
		continue
	if e < 0:
		result += -1 - e
	else:
		result += e - 1
print(result)


n = int(input())
m = list(map(int, input().split()))
k = 0
kk = 0
ans = 0
for i in range(n):
	if m[i] < -1:
		k += 1
		ans += abs(m[i]) - 1
	elif m[i] > 1:
		ans += m[i] - 1
	elif m[i] == 0:
		kk += 1
		ans += 1
	elif m[i] == -1:
		k += 1
if k % 2 == 1:
	if kk == 0:
		ans += 2
print(ans)


n = int(input())
l = list(map(int, input().split()))
l.sort()
ne = 0
ps = 0
for i in range(n):
	if l[i] < 1:
		ne = ne + 1
	else:
		ps = ps + 1
p = 2 * (ne // 2)
ans = 0
for i in range(n):
	if i < p:
		ans = ans + abs(-1 - l[i])
	else:
		ans = ans + abs(1 - l[i])
print(ans)


n = int(input())
a = list(map(int, input().split()))
cnt = 0
for i in range(n):
	cnt += min(abs(1 - a[i]), abs(-1 - a[i]))
ncnt = 0
for i in range(n):
	ncnt += int(bool(a[i] < 0))
if ncnt % 2 and a.count(0) == 0:
	print(cnt + 2)
else:
	print(cnt)


input()
cost = 0
negative = False
no_zeros = True
for a in map(int, input().split()):
	if a > 0:
		cost += a - 1
	elif a < 0:
		cost -= a + 1
		negative = not negative
	else:
		cost += 1
		no_zeros = False
print(cost + 2 * negative * no_zeros)


x = int(input())
l = []
h = []
f = []
e = 0
for x in map(int, input().split()):
	l.append(x)
	if x < 0:
		e += abs(x) - 1
		h.append(-1)
	elif x > 0:
		e += x - 1
		h.append(1)
	else:
		e += 1
		f.append(x)
if len(f) > 0:
	print(e)
else:
	m = 1
	z = 0
	while z < len(h):
		m *= h[z]
		z += 1
	if m == -1:
		print(e + 2)
	else:
		print(e)


from math import fabs
n = int(input())
a = list(map(int, input().split()))
c = 0
p = 1
z = 0
for i in range(n):
	if a[i] != 0:
		if a[i] < 0:
			t = -(a[i] + 1)
		else:
			t = 1 - a[i]
		p *= a[i] + t
		c += fabs(t)
	else:
		z += 1
if p == -1:
	if z == 0:
		c += 2
	else:
		c += z
else:
	c += z
print(int(c))


input()
c = 1
s = d = 0
for x in map(int, input().split()):
	c &= x != 0
	d += x < 0
	s += min(abs(x - 1), abs(x + 1))
print(s + c * d % 2 * 2)


n = int(input())
a = list(map(int, input().split(' ')))
ans = 0
noZero = 0
noPositive = 0
noNegative = 0
noMinusone = 0
for i in range(n):
	if a[i] == 0:
		noZero += 1
	elif a[i] > 0:
		noPositive += 1
		ans += a[i] - 1
	elif a[i] < -1:
		noNegative += 1
		ans += -1 - a[i]
	elif a[i] == -1:
		noMinusone += 1
if (noMinusone + noNegative) % 2 != 0:
	if noZero == 0:
		ans += 2
ans += noZero
print(ans)


n = int(input())
l = list(map(int, input().split()))
x = 0
y = 0
z = 1
for i in l:
	if i > 0:
		x += i - 1
	elif i < 0:
		x += abs(i) - 1
		z *= -1
	else:
		y += 1
if y == 0 and z == -1:
	print(x + 2)
else:
	print(x + y)


n = int(input())
s = str(input()).split()
cn = 0
c0 = 0
m = 0
for i in range(n):
	s[i] = int(s[i])
	if s[i] == 0:
		c0 += 1
	elif s[i] < 0:
		cn += 1
		m += -1 - s[i]
	else:
		m += s[i] - 1
if cn % 2 == 0:
	print(m + c0)
elif c0 > 0:
	print(m + c0)
else:
	print(m + 2)


n = int(input())
a = list(map(int, input().split()))
total = 0
k = 0
for i in range(n):
	total += abs(abs(a[i]) - 1)
	if a[i] < 0:
		k += 1
if k % 2 == 1:
	if 0 not in a:
		total += 2
print(total)


n = int(input())
lst = [int(x) for x in input().split()]
even = sum((1 for x in lst if x >= 0))
odd = n - even
ans = 0
ans = sum((abs(x - 1) if x >= 0 else abs(-1 - x) for x in lst))
if odd % 2 != 0:
	ans += 0 if 0 in lst else 2
print(ans)


n = int(input())
s = [int(i) for i in input().split(' ')]
total = 0
minus_1 = 0
zeros = 0
for i in range(len(s)):
	if abs(s[i] - -1) < abs(s[i] - 1):
		total += abs(s[i] - -1)
		s[i] = s[i] + abs(s[i] - -1)
	elif abs(s[i] - -1) > abs(s[i] - 1):
		total += abs(s[i] - 1)
		s[i] = s[i] - abs(s[i] - 1)
for i in range(len(s)):
	if s[i] == -1:
		minus_1 += 1
	elif s[i] == 0:
		zeros += 1
if minus_1 % 2 == 1:
	if zeros == 0:
		total += 2
total += zeros
print(int(total))


input()
a = [int(x) for x in input().split()]
(x, y, z) = ([], [], [])
for i in range(len(a)):
	if a[i] > 0:
		x.append(a[i])
	elif a[i] == 0:
		y.append(a[i])
	else:
		z.append(a[i])
c = abs(sum(z)) - len(z) + sum(x) - len(x)
if y == []:
	if len(z) % 2 == 1:
		c += 2
else:
	c += len(y)
print(c)


N = int(input())
L = list(map(int, input().split()))
(FLAG, count, ans) = (0, 0, 0)
for i in L:
	if i == 0:
		FLAG = 1
		ans += 1
	elif i < 0:
		count += 1
		ans = ans + (abs(i) - 1)
	else:
		ans = ans + i - 1
if FLAG == 0 and count % 2 != 0:
	ans = ans + 2
print(ans)


n = int(input())
ls = list(map(int, input().split()))
neg = 0
z = 0
ss = 0
for i in ls:
	if i < 0:
		ss += abs(i) - 1
		neg += 1
	elif i == 0:
		ss += 1
		z = 1
	else:
		ss += i - 1
if neg % 2 == 0:
	print(ss)
elif z == 1:
	print(ss)
else:
	print(ss + 2)


a = int(input())
b = sorted(list(map(int, input().split())))
c = list((a for a in b if a < 0))
d = list((a for a in b if a > 0))
e = list((a for a in b if a == 0))
f = sum(d) - len(d) - sum(c) - len(c) + len(e)
if len(c) % 2 == 1:
	if len(e) == 0:
		f += 2
print(f)


n = int(input())
l = list(map(int, input().split()))
count = 0
for i in range(n):
	if l[i] < -1:
		count += -1 - l[i]
		l[i] = -1
	elif l[i] > 1:
		count += l[i] - 1
		l[i] = 1
	elif l[i] == 0:
		count += 1
if l.count(-1) % 2 == 1 and l.count(0) < 1:
	count += 2
print(count)


def prod1(n, a):
	(mc, pc, zc) = (0, 0, 0)
	for item in a:
		if item < 0:
			mc += 1
		elif item > 0:
			pc += 1
		else:
			zc += 1
	res = 0
	for item in a:
		if item < 0:
			res += abs(item) - 1
		elif item > 0:
			res += item - 1
		else:
			res += 1
	if mc % 2 != 0:
		if zc == 0:
			res += 2
	print(res)
n = int(input())
a = list(map(int, input().split()))
prod1(n, a)


def main():
	n = int(input())
	v = [int(x) for x in input().split()]
	zeroes = 0
	pos = 0
	neg = 0
	ans = 0
	for i in range(n):
		if v[i] == 0:
			zeroes += 1
		if v[i] < 0:
			neg += 1
			ans += -1 - v[i]
		if v[i] > 0:
			pos += 1
			ans += v[i] - 1
	ans += zeroes
	if neg % 2 == 1 and zeroes == 0:
		ans += 2
	print(ans)
main()


n = int(input())
arr = [int(x) for x in input().split()]
coins = 0
negatives = 0
zero = False
for i in arr:
	if i > 0:
		coins = coins + (i - 1)
	elif i == 0:
		coins += 1
		zero = True
	else:
		coins = coins + (i + 1) * -1
		negatives += 1
if negatives % 2 == 1:
	if zero:
		print(coins)
	else:
		print(coins + 2)
else:
	print(coins)


import sys
input = sys.stdin.readline
from collections import *
n = int(input())
a = list(map(int, input().split()))
dp = [[10 ** 18] * 2 for _ in range(n + 1)]
dp[0][0] = 0
for i in range(n):
	dp[i + 1][0] = min(dp[i][0] + abs(a[i] - 1), dp[i][1] + abs(a[i] + 1))
	dp[i + 1][1] = min(dp[i][0] + abs(a[i] + 1), dp[i][1] + abs(a[i] - 1))
print(dp[n][0])


from __future__ import division, print_function
import os
import sys
from io import BytesIO, IOBase
if sys.version_info[0] < 3:
	from __builtin__ import xrange as range
	from future_builtins import ascii, filter, hex, map, oct, zip

def main():
	n = int(input())
	a = [int(i) for i in input().split()]
	p = 0
	n = 0
	z = 0
	c = 0
	for i in a:
		if i > 0:
			p += 1
		elif i < 0:
			n += 1
		else:
			z += 1
		c += abs(abs(i) - 1)
	if n % 2 and z == 0:
		c += 2
	print(c)
BUFSIZE = 8192

class FastIO(IOBase):
	newlines = 0

	def __init__(self, file):
		self._fd = file.fileno()
		self.buffer = BytesIO()
		self.writable = 'x' in file.mode or 'r' not in file.mode
		self.write = self.buffer.write if self.writable else None

	def read(self):
		while True:
			b = os.read(self._fd, max(os.fstat(self._fd).st_size, BUFSIZE))
			if not b:
				break
			ptr = self.buffer.tell()
			(self.buffer.seek(0, 2), self.buffer.write(b), self.buffer.seek(ptr))
		self.newlines = 0
		return self.buffer.read()

	def readline(self):
		while self.newlines == 0:
			b = os.read(self._fd, max(os.fstat(self._fd).st_size, BUFSIZE))
			self.newlines = b.count(b'\n') + (not b)
			ptr = self.buffer.tell()
			(self.buffer.seek(0, 2), self.buffer.write(b), self.buffer.seek(ptr))
		self.newlines -= 1
		return self.buffer.readline()

	def flush(self):
		if self.writable:
			os.write(self._fd, self.buffer.getvalue())
			(self.buffer.truncate(0), self.buffer.seek(0))

class IOWrapper(IOBase):

	def __init__(self, file):
		self.buffer = FastIO(file)
		self.flush = self.buffer.flush
		self.writable = self.buffer.writable
		self.write = lambda s: self.buffer.write(s.encode('ascii'))
		self.read = lambda : self.buffer.read().decode('ascii')
		self.readline = lambda : self.buffer.readline().decode('ascii')

def print(*args, **kwargs):
	(sep, file) = (kwargs.pop('sep', ' '), kwargs.pop('file', sys.stdout))
	at_start = True
	for x in args:
		if not at_start:
			file.write(sep)
		file.write(str(x))
		at_start = False
	file.write(kwargs.pop('end', '\n'))
	if kwargs.pop('flush', False):
		file.flush()
if sys.version_info[0] < 3:
	(sys.stdin, sys.stdout) = (FastIO(sys.stdin), FastIO(sys.stdout))
else:
	(sys.stdin, sys.stdout) = (IOWrapper(sys.stdin), IOWrapper(sys.stdout))
input = lambda : sys.stdin.readline().rstrip('\r\n')
main()


qtd = int(input())
nums = list(map(int, input().split()))
dif = 0
neg_count = 0
count0 = 0
for num in nums:
	if num < 0:
		aux = num + 1
		dif += abs(aux)
		neg_count += 1
	elif num > 0:
		dif += num - 1
	else:
		count0 += 1
if count0 > 1:
	dif += count0 - 1
	count0 = 1
if neg_count % 2 != 0:
	if count0 == 1:
		dif += 1
	else:
		dif += 2
else:
	dif += count0
print(dif)


n = int(input())
l = list(map(int, input().split()))
pos = []
neg = []
for i in l:
	if i >= 0:
		pos.append(i)
	else:
		neg.append(i)
ans = 0
count = 0
for i in pos:
	if i == 0:
		count += 1
	else:
		ans += i - 1
for i in neg:
	ans += abs(i) - 1
if len(neg) % 2 == 0:
	ans += count
elif (len(neg) + count) % 2 == 0:
	ans += count
elif count > 1:
	ans += count
else:
	ans += count + 2
print(ans)


import sys
n = int(sys.stdin.readline())
x = sys.stdin.readline().split()
zeros = 0
count = 0
neg = 0
for i in range(0, n):
	y = int(x[i])
	if y == 0:
		zeros += 1
	elif y > 0:
		count += y - 1
	else:
		neg += 1
		count += abs(y + 1)
if neg % 2 != 0:
	if zeros > 0:
		count += 1
		zeros -= 1
	else:
		count += 2
print(count + zeros)
exit()


from collections import Counter
n = int(input())
l = list(map(int, input().split()))
ans = 0
zero = 0
for t in range(n):
	if l[t] == 0:
		zero += 1
	if l[t] > 0:
		ans += l[t] - 1
		l[t] = 1
	if l[t] < 0:
		ans -= l[t] + 1
		l[t] = -1
d = Counter(l)
if d[-1] % 2 == 0:
	print(ans + zero)
elif d[-1] % 2 != 0 and d[0] != 0:
	print(ans + zero)
elif d[-1] % 2 != 0 and d[0] == 0:
	print(ans + 2)


n = int(input())
x = list(map(int, input().split()))
a = []
b = []
z = 0
ans = 0
for i in x:
	if i == 0:
		z += 1
	if i < 0:
		a.append(i)
	else:
		b.append(i)
if len(a) % 2 == 0:
	for k in a:
		ans = ans - 1 - k
else:
	for k in a:
		ans = ans - 1 - k
	if z == 0:
		ans = ans + 2
for j in b:
	ans = ans + abs(j - 1)
print(ans)


n = int(input())
A = list(map(int, input().split()))
ans = 0
cnt = 0
cnt0 = 0
for x in A:
	if x == 0:
		ans += 1
		cnt0 += 1
	elif x > 0:
		ans += x - 1
	else:
		ans += -x - 1
		cnt += 1
if cnt % 2 == 1 and cnt0 == 0:
	ans += 2
print(ans)


n = int(input())
a = [int(x) for x in input().split(' ')]
cnt = sum([abs(abs(b) - 1) for b in a])
if 0 not in a:
	if len([b for b in a if b < 0]) % 2 == 1:
		cnt += 2
print(cnt)


n = int(input())
c = list(map(int, input().split()))
c = sorted(c)
count = 0
mi = 0
for i in range(n):
	if c[i] < 0:
		mi = mi + 1
r = 0
if mi % 2 == 0:
	flag = 0
else:
	flag = 1
	r = 1
for i in range(n):
	if c[i] < 0 and flag == 1:
		count = count + (1 - c[i])
		flag = 0
	elif c[i] < 0:
		count = count + (-1 - c[i])
	elif c[i] == 0 and r == 1:
		count = count + 1 - 2
		r = 0
	elif c[i] == 0 and r == 0:
		count = count + 1
	else:
		count = count + c[i] - 1
print(count)


n = int(input())
count = 0
m = 1
flag = 0
lst = [int(x) for x in input().split()]
for i in range(n):
	if lst[i] == 0:
		flag = 1
		count += 1
	else:
		count += abs(lst[i]) - 1
	lst[i] = -1 if lst[i] < 0 else 1
	m = m * lst[i]
if m == -1 and flag == 0:
	count += 2
print(count)


import collections
import math
n = int(input())
a = [int(i) for i in input().split()]
a.sort()
count = 0
countn = 0
countp = 0
countz = 0
f = 0
ft = 0
sm = 0
st = 0
for i in range(0, n):
	if a[i] < 0:
		count += abs(a[i] + 1)
		countn += 1
	elif a[i] == 0:
		countz += 1
	else:
		countp += 1
		count += abs(a[i] - 1)
		if f == 0:
			f = 1
			sm = a[i]
	if i + 1 < n and a[i + 1] > 0 and (ft == 0) or (a[i] < 0 and i + 1 == n and (ft == 0)):
		st = a[i]
		ft = 1
if countz != 0:
	count += countz
elif countn % 2 != 0:
	count += 2
print(count)


n = input()
s = list(map(int, input().split()))
null = 0
ans = 0
minus = 0
for i in s:
	if i < 0:
		minus += 1
	if i == 0:
		null += 1
		continue
	ans += abs(abs(i) - 1)
if minus % 2 == 1:
	if null > 0:
		print(ans + null)
	else:
		print(ans + 2)
else:
	print(ans + null)


n = int(input())
a = map(int, input().split())
parity = 1
total = 0
zero_present = False
for elem in a:
	if elem == 0:
		zero_present = True
		total += 1
	elif elem > 0:
		total += elem - 1
	else:
		total += -1 - elem
		parity *= -1
if zero_present:
	print(total)
elif parity == 1:
	print(total)
else:
	print(total + 2)


num_pro = int(input())
products = [int(s) for s in input().split(' ')]
coins = 0
zero = []
h = 1
for x in range(0, num_pro):
	n = 0
	if products[x] > 0:
		n = products[x] - 1
		products[x] -= n
		coins += n
	elif products[x] < 0:
		n = products[x] + 1
		products[x] -= n
		coins += abs(n)
	elif products[x] == 0:
		zero.append(0)
	if products[x] != 0:
		h *= products[x]
if h == -1 and len(zero) != 0:
	coins += len(zero)
	h = 1
else:
	coins += len(zero)
if h == -1:
	coins += 2
print(coins)


n = int(input())
a = list(map(int, input().split()))
total = 0
for i in range(0, n):
	if a[i] != 1 and a[i] != -1:
		if a[i] > 0:
			total = total + abs(1 - a[i])
			a[i] = 1
		elif a[i] < 0:
			a[i] = abs(a[i])
			total = total + abs(1 - a[i])
			a[i] = -1
count0 = a.count(0)
countm1 = a.count(-1)
if countm1 % 2 == 1:
	if count0 > 0:
		total = total + count0
	else:
		total = total + 2
else:
	total = total + count0
print(total)


def main():
	n = int(input())
	l = list(map(int, input().split()))
	ans = 0
	pos = True
	zero = False
	for i in range(0, n):
		ans += abs(abs(l[i]) - 1)
		if l[i] < 0:
			pos = not pos
		if l[i] == 0:
			zero = True
	if not pos and (not zero):
		ans += 2
	print(ans)
main()


def minm(a, N):
	p = 0
	n = 0
	z = 0
	s = 0
	for i in range(N):
		if a[i] == 0:
			z += 1
		elif a[i] < 0:
			n += 1
			s = s + (-1 - a[i])
		else:
			p += 1
			s = s + (a[i] - 1)
	if n % 2 == 0:
		s = s + z
	elif z > 0:
		s = s + z
	else:
		s = s + 2
	return s
n = int(input().strip())
A = list(map(int, input().strip().split()))
print(minm(A, n))


negativecounter = 0
steps = 0
noo = 0
n = int(input())
arr = list(map(int, input().split()))
for i in arr:
	if i < 0:
		negativecounter += 1
arr.sort()
if negativecounter % 2 == 0:
	for i in range(n):
		if arr[i] > 1:
			steps += arr[i] - 1
		elif arr[i] == 0:
			steps += 1
		elif arr[i] < -1:
			steps += -1 * (arr[i] + 1)
		else:
			steps += 0
else:
	steps += abs(arr[0]) + 1
	for i in range(1, n):
		if arr[i] > 1:
			steps += arr[i] - 1
		elif noo == 0 and arr[i] == 0:
			steps -= 1
			noo += 1
		elif arr[i] == 0:
			steps += 1
		elif arr[i] < -1:
			steps += -1 * (arr[i] + 1)
		else:
			steps += 0
print(steps)


n = int(input())
arr = list(map(int, input().split()))
neg = 0
z = 0
ans = 0
for i in arr:
	if i <= -1:
		neg += 1
	if i == 0:
		z += 1
	ans += min(abs(i - 1), abs(i + 1))
if neg % 2 == 1 and z == 0:
	ans += 2
print(ans)


n = int(input())
st = input()
st = st.split()
x = 0
s = 0
p = 0
c = 0
while x < n:
	d = int(st[x])
	if d < 0:
		d = d * -1
		p = p + 1
	if d == 0:
		s = s + 1
		c = c + 1
	else:
		s = s + (d - 1)
	x = x + 1
if p % 2 != 0 and c == 0:
	s = s + 2
print(s)


n = int(input())
x = list(map(int, input().split(' ')))
(sum, count) = (0, 0)
for i in x:
	sum += abs(abs(i) - 1)
	if i < 0:
		count += 1
print(sum if count % 2 == 0 else sum + 2 if 0 not in x else sum)


a = int(input())
arr = list(map(int, input().split()))
mc = 0
for i in arr:
	if i > 1:
		mc = mc + i - 1
	elif i < -1:
		mc = mc + abs(i) - 1
for i in range(0, len(arr)):
	if arr[i] > 1:
		arr[i] = 1
	if arr[i] < -1:
		arr[i] = -1
m1 = 0
c0 = 0
for i in arr:
	if i == -1:
		m1 = m1 + 1
	if i == 0:
		c0 = c0 + 1
if m1 % 2 == 0:
	print(mc + c0)
elif c0 == 0:
	print(mc + 2)
else:
	print(mc + c0)


size = int(input())
lista = input()
processed = lista.split()
for i in range(0, len(processed)):
	processed[i] = int(processed[i])
coins = 0
neg = 0
zero = 0
for x in processed:
	if x == 1:
		continue
	elif x == -1:
		neg += 1
	elif x == 0:
		zero = 1
		coins += 1
	elif x > 1:
		coins += x - 1
	elif x < -1:
		neg += 1
		coins += -x - 1
if neg // 2 != neg / 2:
	if not zero:
		coins += 2
print(coins)


n = int(input())
L = list(map(int, input().split()))
ans = 0
c = 0
z = 0
m = 1000000000000
for i in L:
	if i <= -1:
		ad = abs(i + 1)
		c += 1
	else:
		ad = abs(i - 1)
		if i == 0:
			z += 1
	ans += ad
	if i <= -1:
		m = min(m, abs(i + 1))
	if i >= 1:
		m = min(m, abs(i - 1))
if c % 2 == 0:
	print(ans)
elif z > 0:
	print(ans)
else:
	ans += 2
	print(ans)


n = int(input())
f = list(map(int, input().split()))
d = 0
minus = 0
nul = 0
for i in range(n):
	if f[i] == 0:
		d += 1
		nul += 1
	else:
		d += abs(f[i]) - 1
		if f[i] < 0:
			minus += 1
if minus % 2 != 0:
	if nul == 0:
		d += 2
print(d)


n = int(input())
a = list(map(int, input().split()))
c = 0
zc = 0
p = 1
for i in a:
	if i != -1 and i != 1:
		if i < -1:
			c += -i - 1
			p *= -1
		elif i > 1:
			c += i - 1
			p *= 1
		else:
			zc += 1
	else:
		p *= i
if zc > 0 or p == 1:
	print(c + zc)
else:
	print(c + 2)


n = int(input())
a = list(map(int, input().split()))
p = [0] * n
m = [0] * n
p[0] = -1 + a[0] if a[0] > 0 else 1 - a[0]
m[0] = -1 - a[0] if a[0] < 0 else 1 + a[0]
for i in range(1, n):
	pi = -1 + a[i] if a[i] > 0 else 1 - a[i]
	mi = -1 - a[i] if a[i] < 0 else 1 + a[i]
	p[i] = min(p[i - 1] + pi, m[i - 1] + mi)
	m[i] = min(m[i - 1] + pi, p[i - 1] + mi)
print(p[n - 1])


def mi():
	return list(map(int, input().split()))
n = int(input())
a = sorted(list(mi()))
ans = 0
skip = False
for i in range(n):
	if skip:
		skip = False
		continue
	if i < n - 1:
		if abs(-1 - a[i]) + abs(-1 - a[i + 1]) <= abs(1 - a[i]) + abs(1 - a[i + 1]):
			ans += abs(-1 - a[i]) + abs(-1 - a[i + 1])
		else:
			ans += abs(1 - a[i]) + abs(1 - a[i + 1])
		skip = True
	else:
		ans += abs(1 - a[i])
print(ans)


import sys
input = sys.stdin.readline
N = int(input())
A = list(map(int, input().split()))
ans = 0
D = [0, 0, 0]
for a in A:
	if a < 0:
		ans += -1 - a
		D[0] += 1
	elif a > 0:
		ans += a - 1
		D[1] += 1
	else:
		D[2] += 1
if D[0] % 2 == 0:
	ans += D[2]
elif D[2] > 0:
	ans += D[2]
else:
	ans += 2
print(ans)


def solution():
	input()
	m1 = map(int, input().split())
	count = zero = 0
	sign = 1
	for v in m1:
		count += abs(abs(v) - 1)
		if v < 0:
			sign = sign * -1
		if not v:
			zero += 1
	if sign == -1:
		if not zero:
			count += 2
	print(count)

def main():
	solution()
main()


input()
a = list(map(int, input().split()))
b = sum([min(abs(i - 1), abs(-1 - i)) for i in a])
c = len(tuple(filter(lambda x: x < 0, a)))
print([b, b + 2][c % 2 and (c + (0 in a)) % 2])


n = int(input())
arr = list(map(int, input().split()))
cost = 0
minus = 0
plus = 0
zero = 0
for i in arr:
	if i < 0:
		cost += abs(i + 1)
		minus += 1
	elif i > 0:
		cost += i - 1
		plus += 1
	else:
		zero += 1
if zero == 0:
	if minus % 2 != 0:
		cost += 2
else:
	cost += zero
print(cost)


n = int(input())
arr = [int(i) for i in input().split()]
dp = [1000] * n
cn = 0
co = 0
mp = 1000000
for i in range(n):
	if mp > arr[i] and arr[i] != 0:
		mp = arr[i]
		ind = i
	if arr[i] > 0:
		dp[i] = arr[i] - 1
	elif arr[i] < 0:
		dp[i] = -1 - arr[i]
		cn += 1
	else:
		dp[i] = 1
		co += 1
ans = sum(dp)
if cn % 2 != 0 and co == 0:
	ans = ans + 2
print(ans)


n = int(input())
l = [int(i) for i in input().split()][:n]
c0 = 0
n1 = 0
s = 0
for i in l:
	if i == 0:
		c0 += 1
	elif i > 0:
		s += i - 1
	else:
		s += -1 - i
		n1 += 1
if n1 & 1 and c0 == 0:
	print(s + 2)
else:
	print(s + c0)


n = int(input())
nums = [int(i) for i in input().split()]
nums2 = []
counter = 0
c2 = 0
for i in nums:
	if i == -1 or i == 1 or i == 0:
		nums2.append(i)
		if i == -1:
			c2 += 1
	elif i < 0:
		counter += -1 - i
		nums2.append(-1)
		c2 += 1
	elif i > 0:
		counter += i - 1
		nums2.append(1)
for i in range(n):
	if nums2[i] == 0:
		if c2 % 2 != 0:
			nums2[i] = -1
			c2 += 1
		else:
			nums2[i] = 1
		counter += 1
if c2 % 2 != 0:
	counter += 2
print(counter)


import sys
input = sys.stdin.readline
n = int(input())
numlist = list(map(int, input().split()))
totalcnt = minuscnt = zerocnt = 0
for i in range(n):
	if numlist[i] == 1:
		continue
	if numlist[i] == -1:
		minuscnt += 1
		continue
	if numlist[i] > 0:
		totalcnt += numlist[i] - 1
	elif numlist[i] < 0:
		totalcnt += -numlist[i] - 1
		minuscnt += 1
	else:
		zerocnt += 1
if zerocnt:
	print(totalcnt + zerocnt)
elif minuscnt % 2:
	print(totalcnt + 2)
else:
	print(totalcnt)


n = int(input())
l = list(map(int, input().split()))
cont1 = 0
cont2 = 0
for i in l:
	if i <= -1 or i == 0:
		cont1 += abs(-1 - i)
		cont2 += 1
	else:
		cont1 += abs(1 - i)
if cont2 % 2 != 0 and 0 in l:
	pass
elif cont2 % 2 != 0:
	cont1 += 2
print(cont1)


def make_product_equal_one(n, a):
	coins = 0
	n_neg1 = 0
	n_zero = 0
	for x in a:
		if x <= -1:
			coins += -1 - x
			n_neg1 += 1
		elif x >= 1:
			coins += x - 1
		elif x == 0:
			n_zero += 1
	if n_neg1 % 2 == 0:
		coins += n_zero
	elif n_zero > 0:
		coins += n_zero
	else:
		coins += 2
	return coins
n = int(input())
a = [int(e) for e in input().split()]
print(make_product_equal_one(n, a))


n = int(input())
sum = 0
c = 0
f = 0
arr = list(map(int, input().split()))
for a in arr:
	if a < 0:
		sum = sum + (1 - a)
		c = c + 1
	elif a > 0:
		sum = sum + (a - 1)
	else:
		sum = sum + 1
		f = f + 1
d = c // 2
e = c % 2
sum = sum - d * 4
if e >= 1:
	if f >= e:
		sum = sum - 2 * e
	else:
		sum = sum - 2 * f
print(int(sum))


n = int(input())
neg = 0
zer = 0
ans = 0
for x in input().split():
	x = int(x)
	ans += abs(abs(x) - 1)
	if x == 0:
		zer += 1
	elif x < 0:
		neg += 1
if neg % 2 and zer == 0:
	print(ans + 2)
else:
	print(ans)


n = int(input())
a = list(map(int, input().split()))
a.insert(0, 0)
p = print
(mx, mn, ans, t1, t2, t3) = (-int(1e+18), int(1e+18), 0, 0, 0, 0)
for i in range(1, n + 1):
	if a[i] > 1:
		ans += a[i] - 1
		a[i] = 1
	elif a[i] < -1:
		ans += abs(a[i]) - 1
		a[i] = -1
		t1 += 1
	elif a[i] == 0:
		ans += 1
		a[i] = 1
		t2 += 1
	elif a[i] == -1:
		t1 += 1
if t1 & 1 == 0:
	print(ans)
	exit(0)
if t2 > 0:
	print(ans)
	exit(0)
print(ans + 2)


garbage = input()
a = list(map(int, input().rstrip().split(' ')))
a1 = [l for l in a if l < 0]
a2 = [l for l in a if l > 0]
a3 = [l for l in a if l == 0]
total = 0
for i in a1:
	total = total + abs(i + 1)
for i in a2:
	total = total + abs(i - 1)
if len(a3) and len(a1) % 2:
	total += len(a3)
elif len(a3) == 0 and len(a1) % 2:
	total = total + 2
elif len(a1) == 0 and len(a2) == 0:
	total = len(a3)
else:
	total = total + len(a3)
print(total)


n = int(input())
a = list(map(int, input().split()))
num = 0
mi = 0
zero = 0
for i in range(n):
	if a[i] == 0:
		num += 1
		zero += 1
	elif a[i] > 0:
		num += a[i] - 1
	else:
		num += abs(a[i]) - 1
		mi += 1
if zero > 0:
	print(num)
elif mi % 2 != 0:
	print(num + 2)
else:
	print(num)


n = int(input())
l1 = list(map(int, input().split()))
p = 0
ps = 0
n = 0
ns = 0
z = 0
ans = 0
for x in l1:
	if x > 0:
		ps += x
		p += 1
	elif x < 0:
		ns += x
		n += 1
	else:
		z += 1
	ans = z
	ans += ps
	ans -= ns
	ans -= p
	ans -= n
	if z == 0 and n % 2 == 1:
		ans += 2
print(ans)


a = int(input())
b = list(map(int, input().split()))
d = 0
c = 0
for i in b:
	if i <= -1 or i == 0:
		c += 1
		d += abs(-i - 1)
	else:
		d += abs(1 - i)
if c % 2 != 0 and 0 in b:
	c -= 1
if c % 2 != 0:
	d += 2
print(d)


input()
a = list(map(int, input().split()))
c = z = a.count(0)
n = a.count(-1)
for item in a:
	if item != 1 and item != -1 and (item != 0):
		if item < 0:
			n += 1
			c += -1 - item
		else:
			c += item - 1
if n % 2 != 0:
	if z > 0:
		print(c)
	else:
		print(c + 2)
else:
	print(c)


coin = 0
n = int(input())
a = [int(k) for k in input().split()]
for i in range(len(a)):
	if a[i] > 1:
		coin += a[i] - 1
		a[i] = 1
	elif a[i] < -1:
		coin += -a[i] - 1
		a[i] = -1
if a.count(0) != 0 and a.count(-1) % 2 != 0:
	coin += 1
	if a.count(0) > 1:
		coin += a.count(0) - 1
elif a.count(-1) % 2 != 0 and a.count(0) == 0:
	coin += 2
elif a.count(-1) % 2 == 0 and a.count(0) != 0:
	coin += a.count(0)
print(coin)


n = int(input())
arr = list(map(int, input().split()))
r = 0
has_0 = False
neg = 0
for el in arr:
	r += abs(abs(el) - 1)
	if el < 0:
		neg += 1
	if el == 0:
		has_0 = True
if neg % 2 == 1:
	if has_0 != True:
		r += 2
print(r)


n = int(input())
a = []
s = input().split()
pos = []
neg = []
zero = []
for i in s:
	a.append(int(i))
	if int(i) > 0:
		pos.append(int(i))
	elif int(i) < 0:
		neg.append(int(i))
	else:
		zero.append(int(i))
coins = 0
if len(neg) % 2 == 0 and len(zero) > 0:
	ind = a.index(0)
	a[ind] = 1
	coins += 1
elif len(neg) % 2 == 0 and len(zero) == 0:
	pass
elif len(neg) % 2 != 0 and len(zero) > 0:
	ind = a.index(0)
	a[ind] = -1
	coins += 1
elif len(neg) % 2 != 0 and len(zero) == 0:
	ind = a.index(max(neg))
	coins += -1 * a[ind] + 1
	a[ind] = 1
for i in range(n):
	if a[i] == 1 or a[i] == -1:
		pass
	elif a[i] > 0:
		coins += a[i] - 1
	elif a[i] < 0:
		coins += -1 - a[i]
	elif a[i] == 0:
		coins += 1
print(coins)


n = int(input())
a = list(map(int, input().split()))
ans = 0

def product(x):
	p = 1
	for i in x:
		p *= i
	return p
for i in range(n):
	if a[i] > 0:
		ans += abs(a[i] - 1)
		a[i] = 1
	elif a[i] < 0:
		ans += -1 - a[i]
		a[i] = -1
ans += a.count(0)
if 0 not in a and product(a) != 1:
	ans += 2
print(ans)


n = int(input())
a = list(map(int, input().split()))
m = 0
r = 0
k = 0
for i in range(n):
	a1 = abs(a[i] - 1)
	a2 = abs(a[i] + 1)
	if a1 == a2:
		k = k + 1
	if a1 > a2:
		r = r + 1
		m = m + a2
	else:
		m = m + a1
if r % 2 != 0 and k == 0:
	m = m + 2
print(m)


n = int(input())
arr = []
mult = 1
count = 0
coin = 0
arr = list(map(int, input().split()))
for i in range(len(arr)):
	if arr[i] > 1:
		x = arr[i] - 1
		arr[i] = 1
		coin = coin + x
	if arr[i] < -1:
		x = -(arr[i] + 1)
		arr[i] = -1
		coin = coin + x
	if arr[i] == 0:
		coin = coin + 1
for i in arr:
	mult = mult * i
if mult == -1:
	coin = coin + 2
print(coin)


n = int(input())
l = [int(x) for x in input().split()]
(ans, m) = (0, 1)
for i in l:
	ans += abs(abs(i) - 1)
	if i < 0:
		m *= -1
	elif i == 0:
		m = 0
if m == -1:
	print(ans + 2)
else:
	print(ans)


x = int(input())
a = list(map(int, input().split()))
z = 0
y = 0
b = 1
d = []
for i in range(x):
	if a[i] < 0 and a[i] < -1:
		d.append(a[i])
		z = -1 - a[i]
		a[i] = -1
		y = y + z
	elif a[i] > 0 and a[i] > 1:
		d.append(a[i])
		z = a[i] - 1
		a[i] = 1
		y = y + z
	elif a[i] == 0:
		d.append(a[i])
		y = y + 1
		a[i] = 1
for i in range(len(a)):
	b = b * a[i]
if b == 1:
	print(y)
elif d.count(0) == 0:
	print(y + 2)
else:
	print(y)


n = int(input())
arr = list(map(int, input().split()))
has0 = False
nneg = 0
cost = 0
for x in arr:
	if x > 0:
		cost += x - 1
	elif x < 0:
		cost += -x - 1
		nneg += 1
	else:
		has0 = True
		cost += 1
if not has0 and nneg % 2 == 1:
	cost += 2
print(cost)


n = int(input())
l = list(map(int, input().split()))
c = 0
r = 0
for i in range(n):
	if l[i] > 0:
		r += l[i] - 1
		l[i] = 1
	elif l[i] < 0:
		r += abs(l[i] + 1)
		l[i] = -1
		c += 1
k = l.count(0)
if k != 0:
	print(r + k)
elif c % 2 == 0:
	print(r)
else:
	print(r + 2)


n = int(input())
nums = list(map(int, input().split()))
negative_nums = []
positive_nums = []
zeroes = 0
for num in nums:
	if num < 0:
		negative_nums.append(num)
	elif num == 0:
		zeroes += 1
	else:
		positive_nums.append(num)
if len(negative_nums) % 2 == 0:
	negative_nums = [-1 - num for num in negative_nums]
	positive_nums = [num - 1 for num in positive_nums]
	total = zeroes + sum(negative_nums) + sum(positive_nums)
elif zeroes > 0:
	negative_nums = [-1 - num for num in negative_nums]
	positive_nums = [num - 1 for num in positive_nums]
	total = zeroes + sum(negative_nums) + sum(positive_nums)
else:
	negative_nums = [-1 - num for num in negative_nums]
	positive_nums = [num - 1 for num in positive_nums]
	total = sum(negative_nums) + sum(positive_nums) + 2
print(total)


n = int(input())
lis = list(map(int, input().split()))
counter = 0
for i in range(n):
	if lis[i] > 1:
		counter += lis[i] - 1
		lis[i] = 1
	elif lis[i] < -1:
		counter += -1 - lis[i]
		lis[i] = -1
counter_neg1 = 0
for i in lis:
	if i == -1:
		counter_neg1 += 1
if counter_neg1 % 2 == 1:
	if 0 not in lis:
		counter += 2
for i in lis:
	if i == 0:
		counter += 1
print(counter)


n = int(input())
a = [int(i) for i in input().split()]
c0 = 0
cn = 0
cp = 0
s = 0
for i in range(n):
	if a[i] < 0:
		s += abs(-1 - a[i])
		cn += 1
	elif a[i] > 0:
		s += abs(1 - a[i])
		cp += 1
	else:
		s += 1
		c0 += 1
if cn % 2 != 0:
	if c0 == 0:
		s += 2
print(s)


n = int(input())
quantity = 0
composition = 1
flag = 0
indx = 0
lst = [int(i) for i in input().split()]
for (ind, i) in enumerate(lst):
	if i < 0:
		quantity += abs(i) - 1
		composition *= -1
	elif i > 0:
		quantity += i - 1
	elif flag == 0:
		indx = ind
		flag = 1
	else:
		quantity += 1
if flag == 0:
	if composition > 0:
		print(quantity)
	else:
		print(quantity + 2)
else:
	print(quantity + 1)


n = int(input())
a = list(map(int, input().split()))
ans = 0
mul = 1
for i in a:
	ans += abs(abs(i) - 1)
	if i < 0:
		mul *= -1
	elif i == 0:
		mul = 0
if mul == -1:
	print(ans + 2)
else:
	print(ans)


import sys
input = sys.stdin.readline
from collections import defaultdict, deque
n = int(input())
l = list(map(int, input().split()))
pos = 0
neg = 0
z = 0
ans = 0
for x in l:
	if x > 0:
		pos += 1
		ans += x - 1
	elif x < 0:
		neg += 1
		ans += -1 - x
	else:
		z += 1
		ans += 1
if neg % 2 == 0:
	print(ans)
elif z > 0:
	print(ans)
else:
	print(ans + 2)


def one(s):
	result = 0
	minus = 0
	zero = 0
	for i in range(len(s)):
		if s[i] > 0:
			result += s[i] - 1
		elif s[i] < 0:
			minus += 1
			result += -(s[i] + 1)
		else:
			result += 1
			zero += 1
	if minus % 2 == 0:
		return result
	elif minus % 2 == 1 and zero == 0:
		return result + 2
	elif minus % 2 == 1 and zero > 0:
		return result
n = int(input())
s = list(map(int, input().split()))
print(one(s))


n = int(input())
nums = [int(i) for i in input().split()]

def count(n, nums):
	count = 0
	res = 1
	flagZero = False
	for x in range(n):
		if nums[x] == 0:
			count += 1
			nums[x] = 1
			flagZero = True
		else:
			count += abs(nums[x]) - 1
			nums[x] = -1 if nums[x] < 0 else 1
		res *= int(nums[x])
	if res != 1:
		if flagZero != True:
			return count + 2
		else:
			return count
	else:
		return count
print(count(n, nums))


input()
arr = list(map(int, input().split()))
(n, z) = (0, 0)
ans = 0
for i in arr:
	if i == 0:
		ans += 1
		z += 1
	elif i < 0:
		ans += -1 - i
		n += 1
	else:
		ans += i - 1
if n % 2 == 1 and z == 0:
	ans += 2
print(ans)


n = int(input())
a = list(map(int, input().split()))
nol = 0
count = 0
pol = 0
for i in a:
	if i == 0:
		nol += 1
		continue
	if i > 0:
		count += i - 1
	else:
		count += abs(i) - 1
		pol -= 1
pol = abs(pol) % 2
if pol == 1 and nol != 0:
	pol = 0
print(count + pol * 2 + nol)


n = int(input())
a = map(int, input().split())
z = False
mi = 1
sc = 0
for i in a:
	if i == 0:
		z = True
		sc += 1
		continue
	sc += abs(i) - 1
	if i < 0:
		mi *= -1
if mi == -1 and (not z):
	sc += 2
print(sc)


import sys
input = sys.stdin.readline
t = int(input())
b = sorted(list(map(int, input().split())))
m = b.count(0)
p = t
for j in range(t):
	if b[j] >= 0:
		p = j
		break
k = b[:p]
q = b[p:]
x = 0
if len(k) % 2 == 0:
	x += abs(sum(k)) - len(k)
elif m >= 1:
	x += abs(sum(k)) - len(k)
	x += 1
	m += -1
	del q[0]
else:
	x += 1 + abs(k[-1])
	r = k[:p - 1]
	x += abs(sum(r)) - len(r)
x += abs(sum(q)) - len(q) + 2 * m
print(x)


def f(a, n):
	c = 0
	neg = 0
	hadzero = False
	for x in a:
		if x < 0:
			neg += 1
		if x == 1 or x == -1:
			continue
		elif x > 1:
			c += x - 1
		elif x < -1:
			c += -1 - x
		else:
			hadzero = True
			c += 1
	if neg % 2 != 0:
		if not hadzero:
			c += 2
	return c
n = int(input().strip())
a = [int(x) for x in input().strip().split()]
print(f(a, n))


n = int(input())
arr = list(map(int, input().split()))
neg = []
pos = []
zeroes = []
count = 0
for _ in arr:
	if _ < 0:
		neg.append(_)
	elif _ > 0:
		pos.append(_)
	else:
		zeroes.append(_)
if len(neg) % 2 != 0:
	if len(zeroes) == 0:
		for i in pos:
			count += abs(i - 1)
		count += 2
		for i in neg:
			count += abs(i - -1)
		print(count)
	elif len(zeroes) == 1:
		for i in neg:
			count += abs(i - -1)
		count += 1
		for i in pos:
			count += abs(i - 1)
		print(count)
	else:
		for i in range(0, len(zeroes) - 1):
			count += 1
		for i in neg:
			count += abs(i - -1)
		for i in pos:
			count += abs(i - 1)
		count += 1
		print(count)
else:
	for i in neg:
		count += abs(i - -1)
	for i in pos:
		count += i - 1
	for i in zeroes:
		count += 1
	print(count)


n = int(input())
l = list(map(int, input().split()))
ans = 0
zero_count = 0
negative_count = 0
for i in l:
	if i < 0:
		ans += -1 - i
		negative_count += 1
	elif i > 0:
		ans += i - 1
	else:
		zero_count += 1
		ans += 1
if negative_count % 2 == 1 and zero_count > 0:
	print(ans)
elif negative_count % 2 == 0:
	print(ans)
else:
	ans += 2
	print(ans)


import sys
import math
import time
n = int(input())
a = [int(j) for j in input().split()]
count_neg = 0
zero = False
coins = 0
for num in a:
	if num == 0:
		coins += 1
		if not zero:
			zero = True
	else:
		if num < 0:
			count_neg += 1
		coins += abs(num) - 1
if not zero and count_neg % 2 == 1:
	print(coins + 2)
else:
	print(coins)


n = int(input())
a = list(map(int, input().split()))
neg = 0
ans = 0
zeros = 0
for i in range(n):
	if a[i] > 0:
		ans += a[i] - 1
	elif a[i] == 0:
		zeros += 1
	else:
		neg += 1
		ans += abs(-1 - a[i])
if neg % 2 != 0:
	if zeros > 0:
		ans += 1
		zeros -= 1
	else:
		ans += 2
ans += zeros
print(ans)


import itertools
import math
import sys
import heapq
from collections import Counter
from collections import deque
from fractions import gcd
from functools import reduce
sys.setrecursionlimit(4100000)
INF = 1 << 60
n = int(input())
a = list(map(int, input().split()))
ans = 0
flag = True
cnt = 0
for i in a:
	if i == 0:
		flag = False
	if i <= -1:
		cnt += 1
	ans += min(abs(1 - i), abs(-1 - i))
if flag and cnt % 2 == 1:
	ans += 2
print(ans)


n = int(input())
a = list(map(int, input().split()))
k = 0
d = 100
p = 1
for i in a:
	c = max(abs(i + 1), abs(i - 1))
	e = min(abs(i + 1), abs(i - 1))
	k += e
	d = min(d, c - e)
	if e == abs(i + 1):
		p *= -1
if p == 1:
	print(k)
else:
	print(k + d)


n = int(input())
a = [int(q) for q in input().split()]
(k, m, x) = (0, 0, 0)
for i in a:
	if i == 0:
		m += 1
	elif i > 1:
		k += i - 1
	elif i <= -1:
		k -= i + 1
		x += 1
k += m
if x % 2 == 1 and m == 0:
	k += 2
print(k)


n = int(input())
l = list(map(int, input().split()))
coins = 0
prod = 1
counter = 0
for i in l:
	if i < 0:
		coins += abs(i + 1)
		prod *= -1
	elif i > 0:
		coins += i - 1
		prod *= 1
	else:
		coins += 1
		counter += 1
if prod < 1 and counter == 0:
	coins += 2
print(coins)


n = int(input())
l = list(map(int, input().split()))
c = 0
for i in range(len(l)):
	if l[i] < 0:
		c += 1
		l[i] = -l[i]
sum = 0
z = 0
for i in l:
	if i == 0:
		z = 1
		sum += 1
	else:
		sum += i - 1
if c % 2 == 1 and z == 0:
	sum += 2
print(sum)


def iinp():
	return int(input())
n = iinp()
a = [int(x) for x in input().split()]
memo = {(0, 1): abs(a[0] - 1), (0, -1): abs(a[0] + 1)}
for ind in range(1, len(a)):
	for v in [-1, 1]:
		ans = min(abs(a[ind] - 1) + memo[ind - 1, v], abs(a[ind] + 1) + memo[ind - 1, v * -1])
		memo[ind, v] = ans
print(memo[len(a) - 1, 1])


import sys
inf = float('inf')
mod = 1000000007

def get_array():
	return list(map(int, sys.stdin.readline().split()))

def get_ints():
	return map(int, sys.stdin.readline().split())

def input():
	return sys.stdin.readline()

def int1():
	return int(input())
import string
import math
from itertools import combinations

def main():
	n = int(input())
	a = list(map(int, input().split()))
	z = 0
	k = 0
	gt = 0
	zero = 0
	for i in range(n):
		if a[i] < 0:
			z += a[i] * -1 - 1
			k += 1
		elif a[i] > 0:
			z += a[i] - 1
			gt += 1
		else:
			z += 1
			zero += 1
	if k == 0:
		print(z)
	elif k % 2 == 0:
		print(z)
	elif zero > 0:
		print(z)
	else:
		print(z + 2)
main()


n = int(input())
a = list(map(int, input().split()))
ans = 0
for i in range(n):
	ans += abs(1 - a[i])
count = 0
for i in range(n):
	if a[i] < 0:
		count += 1
if count % 2 != 0:
	for i in range(n):
		if a[i] == 0:
			ans -= 2
			break
print(ans - count // 2 * 4)


def main():
	n = int(input())
	arr = list(map(int, input().split()))
	neg = []
	pos = []
	coins = 0
	zero = 0
	for i in arr:
		if i > 0:
			pos.append(i)
		elif i < 0:
			neg.append(abs(i))
		else:
			zero += 1
	if len(neg) % 2 == 0:
		for i in neg:
			coins += i - 1
	elif zero > 0:
		for i in neg:
			coins += i - 1
		zero -= 1
		coins += 1
	else:
		for i in neg:
			coins += i - 1
		coins += 2
	for i in pos:
		coins += i - 1
	coins += zero
	print(coins)
main()


(n, data) = (int(input()), [int(i) for i in input().strip().split()])
(pos, neg) = ([], [])
for i in range(n):
	if data[i] >= 0:
		pos.append(abs(data[i] - 1))
	elif data[i] < 0:
		neg.append(abs(data[i] + 1))
ans = sum(pos) + sum(neg)
if len(neg) % 2 != 0 and 0 not in data:
	ans = sum(pos) + sum(neg) + 2
print(ans)


import collections
n = int(input())
a = list(map(int, input().split()))
(p, m, z) = (0, [], 0)
for d in a:
	if d > 0:
		p += d
	elif d < 0:
		m.append(d)
	else:
		z += 1
ans = p - (n - z - len(m))
if len(m) % 2:
	if z:
		m.append(-1)
		ans += 1
		z -= 1
	else:
		m.sort(reverse=True)
		x = m.pop()
		ans += 1 - x
mm = len(m)
ans += abs(sum(m)) - mm
ans += z
print(ans)


n = int(input())
arr = list(map(int, input().split()))
sol = 0
cp = 0
cn = 0
c0 = 0
for i in range(0, n):
	if arr[i] < 0:
		sol += abs(arr[i] + 1)
		cn += 1
	elif arr[i] > 0:
		sol += abs(arr[i] - 1)
	elif arr[i] == 0:
		sol += 1
		c0 += 1
if cn % 2 == 1:
	if c0 > 0:
		pass
	else:
		sol += 2
print(sol)


from collections import defaultdict
import math
x = int(input())
a = list(map(int, input().split()))
ans = 0
zeros = 0
count = 0
for i in a:
	if i > 1:
		ans += i - 1
	elif i < -1:
		count += 1
		ans += -1 - i
	elif i == 0:
		zeros += 1
		ans += 1
	elif i == -1:
		count += 1
if count % 2 != 0:
	if zeros == 0:
		ans += 2
print(ans)


input()
a = [int(x) for x in input().split()]
a = sorted(a)
(k_2, k_3) = (0, 0)
s = 0
for i in a:
	if i != 0:
		s += abs(abs(i) - 1)
		if i < 0:
			k_2 += 1
	else:
		k_3 += 1
if k_2 % 2 == 1 and k_3 == 0:
	s += 2
s += k_3
print(s)


n = int(input())
l = list(map(int, input().split()))
neg = 0
pos = 0
zero = 0
for i in l:
	if i < 0:
		neg += 1
	elif i > 0:
		pos += 1
	else:
		zero += 1
if neg % 2 == 0:
	count = 0
	for i in l:
		if i < 0:
			count += -1 - i
		elif i > 0:
			count += i - 1
		else:
			count += 1
elif neg % 2 == 1:
	count = 0
	if zero > 0:
		for i in l:
			if i < 0:
				count += -1 - i
			elif i > 0:
				count += i - 1
		count += zero
	else:
		for i in l:
			if i < 0:
				count += -1 - i
			elif i > 0:
				count += i - 1
		count += 2
print(count)


n = int(input())
l = [int(num) for num in input().split()]
(k, c, s) = (0, 0, 0)
for i in range(n):
	if l[i] < 0:
		s = s - 1 - l[i]
		k = k + 1
	elif l[i] >= 1:
		s = s + l[i] - 1
	else:
		c = c + 1
if k % 2 == 1:
	if c > 0:
		s += 1
		c = c - 1
	else:
		s = s + 2
print(s + c)


from functools import reduce
n = int(input())
k = 0
zero = False
even = True
numbers = list(map(int, input().split()))
for i in range(n):
	if numbers[i] > 1:
		k += numbers[i] - 1
		numbers[i] = 1
	elif numbers[i] < -1:
		k += abs(numbers[i] + 1)
		if even:
			even = False
		else:
			even = True
		numbers[i] = -1
	elif numbers[i] == 0:
		k += 1
		zero = True
		numbers[i] = 1
result = reduce(lambda x, y: x * y, numbers)
if result == -1 and (not zero):
	k += 2
print(k)


n = int(input())
a = list(map(int, input().split()))
total = 0
num0 = 0
neg = 0
for x in a:
	if x < 0:
		total += -x - 1
		neg += 1
	elif x > 0:
		total += x - 1
	else:
		num0 += 1
if num0:
	total += num0
elif neg & 1:
	total += 2
print(total)


from sys import stdin

def main():
	n = int(stdin.readline())
	nums = list(map(int, stdin.readline().split()))
	(negsCnt, zerosCnt) = (0, 0)
	for i in nums:
		if i < 0:
			negsCnt += 1
		elif i == 0:
			zerosCnt += 1
	coinsCnt = 0
	for i in range(len(nums)):
		if nums[i] < 0:
			coinsCnt += abs(nums[i] + 1)
		elif nums[i] > 0:
			coinsCnt += abs(nums[i] - 1)
		else:
			coinsCnt += 1
	if negsCnt % 2 != 0 and zerosCnt > 0:
		negsCnt += 1
	if negsCnt % 2 != 0:
		coinsCnt += 2
	print(coinsCnt)
main()


q = int(input())
w = list(map(int, input().split()))
zero_count = 0
neg_count = 1
ans = 0
for ii in w:
	if ii == 0:
		zero_count += 1
	elif ii < 0:
		ans = ans + -1 * ii
		neg_count *= -1
	else:
		ans += ii
ans = ans + zero_count - q
if neg_count == -1 and zero_count > 0:
	ans += 1
	zero_count -= 1
elif neg_count == -1:
	ans += 2
if zero_count:
	ans += zero_count
print(ans)


n = int(input())
a = list(map(int, input().split()))
b = [c for c in a if c < 0]
d = [c for c in a if c >= 0]
q = d.count(0)
x = sum(d) - (len(d) - q) + q
if len(b) % 2 == 0:
	u = abs(sum(b))
	u = u - len(b)
	x = x + u
else:
	u = abs(sum(b))
	u = u - len(b) + 2
	x = x + u
	if q != 0:
		x = x - 2
print(x)


input()
a = sorted(map(int, input().split()))
np = []
nz = []
nn = []
for i in a:
	if i < 0:
		nn.append(abs(i))
	elif i == 0:
		nz.append(i)
	else:
		np.append(i)
if nz:
	print(sum(np) - len(np) + len(nz) + sum(nn) - len(nn))
elif len(nn) % 2 == 1:
	print(2 + sum(np) - len(np) + len(nz) + sum(nn) - len(nn))
else:
	print(sum(np) - len(np) + len(nz) + sum(nn) - len(nn))


n = int(input())
a = list(map(int, input().split()))
ans = 0
k = 0
q = 0
for i in range(n):
	if a[i] != -1 and a[i] != 1:
		if a[i] < 0:
			ans += abs(a[i] + 1)
			k += 1
		elif a[i] == 0:
			q += 1
		else:
			ans += a[i] - 1
	elif a[i] == -1:
		k += 1
if k % 2 != 0:
	if q > 0:
		ans += 1
		q -= 1
	else:
		ans += 2
ans += q
print(ans)


n = int(input())
al = list(map(int, input().split()))
count1 = 0
c2 = 0
sum1 = 0
for i in range(len(al)):
	if al[i] < 0:
		sum1 += abs(al[i] - -1)
		count1 += 1
	elif al[i] == 0:
		c2 += 1
	elif al[i] > 1:
		sum1 += al[i] - 1
if count1 % 2 != 0 and c2 != 0:
	sum1 += 1
	c2 -= 1
elif count1 % 2 != 0:
	sum1 += 2
print(sum1 + c2)


n = int(input())
a = list(map(int, input().split()))
(b, c) = ([], [])
(x, x1) = (0, 0)
for i in a:
	if i <= 0:
		b.append(i)
	else:
		c.append(i)
ans = sum(c) - len(c)
b.sort()
for i in b[:-1]:
	ans += abs(-1 - i)
if b:
	if len(b) % 2:
		ans += abs(1 - b[-1])
	else:
		ans += abs(-1 - b[-1])
print(ans)


first_line = input()
nums = [int(x) for x in input().split()]
overall_cost = 0
has_zeros = False
minuses_num = 0
for num in nums:
	if num == 0:
		overall_cost += 1
		has_zeros = True
	else:
		if num < 0:
			minuses_num += 1
		cur_cost = abs(num) - 1
		overall_cost += cur_cost
if not has_zeros and minuses_num % 2 != 0:
	overall_cost += 2
print(overall_cost)


n = int(input())
a = [int(i) for i in input().split()]
(zero, positive, negative, result) = (0, 0, 0, 0)
for elem in a:
	if elem > 0:
		positive += 1
		result += abs(elem - 1)
	elif elem < 0:
		negative += 1
		result += abs(-1 - elem)
	else:
		zero += 1
		result += 1
if negative & 1 and zero == 0:
	result += 2
print(result)


n = int(input())
l = list(map(int, input().split()))
(a, b, c, s) = (0, 0, 0, 0)
for i in range(n):
	s += abs(abs(l[i]) - 1)
	if l[i] < 0:
		a += 1
	elif l[i] > 0:
		c += 1
	else:
		b += 1
if a % 2 == 1 and b <= 0:
	s += 2
print(s)


t = int(input())
no = 0
n = 0
co = 0
for i in str(input()).split():
	if int(i) < 0:
		n += 1
		co -= int(i) + 1
	elif int(i) > 0:
		co += int(i) - 1
	else:
		no += 1
		co += 1
if n % 2 == 1 and no == 0:
	co += 2
print(co)


input()
aa = map(int, input().split())
neg = False
cost = 0
has_zero = False
for a in aa:
	if a == 0:
		cost += 1
		has_zero = True
	else:
		cost += abs(a) - 1
		if a < 0:
			neg = not neg
if neg and (not has_zero):
	cost += 2
print(cost)


n = int(input())
l = [int(i) for i in input().split()]
cost = 0
cnt = 0
lind = -1
for i in range(n):
	if l[i] == 0:
		cnt += 1
		lind = i
	a1 = abs(l[i] - 1)
	a2 = abs(l[i] + 1)
	if a1 < a2:
		l[i] = 1
	else:
		l[i] = -1
	cost += min(a1, a2)
cnt %= 2
p = 1
for i in l:
	p *= i
if p == -1 and lind != -1:
	p = 1
if p == 1:
	print(cost)
else:
	print(cost + 2)


def solution():
	_ = input()
	arr = [int(i) for i in input().split()]
	(left, zero) = (0, 0)
	summary = 0
	for i in arr:
		if i == 0:
			zero += 1
		elif i < 0:
			left += 1
			summary += -1 - i
		else:
			summary += -(1 - i)
	if left % 2 != 0 and (not zero):
		summary += 2
	summary += zero
	print(summary)
solution()


a = int(input())
b = list(map(int, input().split(' ')))
choice = False
positive = True
sum = 0
for i in range(a):
	if b[i] < 0:
		positive = not positive
		sum += -1 - b[i]
	elif b[i] > 0:
		sum += b[i] - 1
	else:
		choice = True
		sum += 1
if choice:
	print(str(sum))
elif positive:
	print(str(sum))
else:
	print(str(sum + 2))


n = int(input())
arr = sorted([int(x) for x in input().split()])
c = 0
neg = []
for i in arr:
	if i > 0:
		c = c + (i - 1)
	elif i < 0:
		neg.append(i)
		c = c + abs(i + 1)
	else:
		c += 1
if len(neg) % 2 == 0 or (len(neg) % 2 == 1 and 0 in arr):
	print(c)
else:
	print(c + 2)


n = int(input())
arr = list(map(int, input().split()))
is_neg = 0
have_zeros = 0
c = 0
for i in range(n):
	if arr[i] < 0:
		is_neg += 1
		c += abs(arr[i]) - 1
	else:
		if arr[i] == 0:
			have_zeros = 1
			c += 1
			continue
		c += arr[i] - 1
if is_neg & 1:
	if not have_zeros:
		c += 2
print(c)


def prog(n, arr):
	coin = 0
	minus = False
	minvary = False
	for i in arr:
		if i > 1:
			coin += i - 1
		elif i <= -1:
			coin += -1 - i
			if minus == False:
				minus = True
			else:
				minus = False
		elif i == 0:
			minvary = True
			coin += 1
	if minus and (not minvary):
		return coin + 2
	else:
		return coin

def main():
	n = int(input())
	arr = list(map(int, input().rstrip().split()))
	ans = prog(n, arr)
	print(ans)
main()


n = int(input())
numbers = list(map(int, input().split()))
pay = 0
isZero = False
parity = 1
for n in numbers:
	if n == 0:
		pay += 1
		isZero = True
	elif n < 0:
		parity *= -1
		pay += -1 - n
	elif n > 0:
		pay += n - 1
if parity == -1 and (not isZero):
	pay += 2
print(pay)


n = int(input())
a = input().split()
product = 1
count = 0
neg = 0
zero = 0
for i in a:
	x = int(i)
	if x < 0:
		count += -1 + abs(x)
		product *= -1
		neg += 1
	if x > 0:
		count += x - 1
		product *= 1
	if x == 0:
		zero += 1
if neg % 2 != 0:
	if zero > 0:
		count += zero
	else:
		count += 2
else:
	count += zero
print(count)


a = int(input())
b = list(map(int, input().strip().split()))
(c, e, g, h, j) = (0, 0, 0, 0, 0)
(d, f) = ([], [])
for i in range(a):
	if b[i] > 1:
		c = c + 1
		d.append(b[i])
	elif b[i] < -1:
		e = e + 1
		f.append(b[i])
	elif b[i] == 0:
		g = g + 1
	elif b[i] == 1:
		h = h + 1
	elif b[i] == -1:
		j = j + 1
k = sum(d) - len(d)
l = abs(sum(f) + len(f))
c = c + h
e = e + j
if e % 2 == 0:
	print(k + l + g)
elif e % 2 != 0:
	if g != 0:
		print(k + l + g)
	if g == 0:
		print(k + l + 2)


def gns():
	return list(map(int, input().split()))
n = int(input())
ns = gns()
ans = 0
cnt = 0
for i in ns:
	if i == 0:
		cnt += 1
		break
if cnt > 0:
	for x in ns:
		ans += min(abs(x - 1), abs(x + 1))
	print(ans)
	quit()
cnt = 0
for x in ns:
	if x < 0:
		cnt += 1
if cnt % 2 == 0:
	for x in ns:
		ans += min(abs(x - 1), abs(x + 1))
	print(ans)
	quit()
ans = 0
for x in ns:
	ans += min(abs(x - 1), abs(x + 1))
print(ans + 2)


n = input()
a = input().split()
(nec, nes, poc, pos, zc) = (0, 0, 0, 0, 0)
for i in a:
	d = int(i)
	if d <= -1:
		nec += 1
		nes += d
	elif d >= 1:
		poc += 1
		pos += d
	else:
		zc += 1
sum = pos - poc + (-nes - nec)
if poc + nec:
	if nec % 2:
		if zc:
			zc -= 1
			sum += 1
		else:
			sum += 2
sum += zc
print(sum)


n = int(input())
s = [int(i) for i in input().split()]
c = 0
h = 0
for i in s:
	if i < 0:
		h += 1
if h % 2 != 0 and s.count(0) > 0:
	s[s.index(0)] = -1
	c += 1
for i in range(n):
	if s[i] > 0:
		c += s[i] - 1
		s[i] = 1
	elif s[i] == 0:
		c += 1
		s[i] = 1
	else:
		c += -1 - s[i]
		s[i] = -1
if s.count(-1) % 2 == 0:
	print(c)
else:
	print(c + 2)


n = int(input())
a = [int(i) for i in input().split()]
a = sorted(a)
sum = 0
minus = 0
for i in a:
	if i == 0:
		if minus % 2 == 1:
			sum += 1
			minus += 1
		else:
			sum += 1
	elif i > 0:
		sum += i - 1
		if minus % 2 == 1:
			sum += 2
			minus += 1
	elif i < 0:
		sum += -1 - i
		minus += 1
if minus % 2 == 1:
	sum += 2
print(sum)


n = int(input())
ints = map(int, input().split())
steps = 0
neg = 0
zeros = 0
for v in ints:
	if v < 0:
		steps += -1 - v
		neg += 1
	elif v > 0:
		steps += v - 1
	else:
		steps += 1
		zeros = 1
if zeros == 1:
	print(steps)
elif neg % 2:
	print(steps + 2)
else:
	print(steps)


n = int(input())
A = list(map(int, input().split()))
mc = 0
zc = 0
ans = 0
for a in A:
	if a < 0:
		mc += 1
	elif a == 0:
		zc += 1
	ans += abs(abs(a) - 1)
if mc % 2 == 1 and zc == 0:
	ans += 2
print(ans)


n = int(input())
a = list(map(int, input().split()))
num = 0
t = 1
d = 0
for i in a:
	t &= i != 0
	d ^= i < 0
	num += (i - 1, abs(i + 1))[i < 1]
print(num + t * d * 2)


n = int(input())
numbers = [0] * n
num_str = input().split()
for i in range(n):
	numbers[i] = int(num_str[i])
result = 0
pos = []
neg = []
zero = []
for num in numbers:
	if num > 0:
		pos.append(num)
	elif num < 0:
		neg.append(num)
	else:
		zero.append(num)
if len(zero) > 0:
	result += len(zero)
elif len(neg) % 2 != 0:
	result += 2
for num in pos:
	result += num - 1
for num in neg:
	result += abs(num) - 1
print(result)


import math
n = int(input())
As = list(map(int, input().split(' ')))
operations_needed = 0
for j in range(n):
	if As[j] < 0:
		operations_needed += -1 - As[j]
		As[j] = -1
	elif As[j] > 0:
		operations_needed += As[j] - 1
c_zero = As.count(0)
if c_zero == 0:
	if As.count(-1) % 2 == 1:
		print(operations_needed + 2)
	else:
		print(operations_needed)
else:
	print(operations_needed + c_zero)


n = int(input())
a = map(int, input().split())
A = list(a)
s = 0
count = 0
count0 = 0
for i in A:
	if i > 0:
		s += i - 1
	if i == 0:
		s += 1
		count0 += 1
	if i < 0:
		s += abs(i) - 1
		count += 1
if count % 2 == 1 and count0 == 0:
	s += 2
print(s)


def main(n, A):
	price = 0
	flag = False
	for i in range(n):
		current_price = abs(abs(A[i]) - 1)
		flag = flag or A[i] == 0
		A[i] += current_price if A[i] < 1 else -current_price
		price += current_price
	m = 1
	for a in A:
		m *= a
	if m == -1 and (not flag):
		price += 2
	return price
n = int(input())
A = list(map(int, input().split()))
print(main(n, A))


n = int(input())
arr = list(map(int, input().split(' ')))
zero = []
positive = []
negative = []
for i in range(len(arr)):
	if arr[i] < 0:
		negative.append(arr[i])
	elif arr[i] == 0:
		zero.append(arr[i])
	else:
		positive.append(arr[i])
count = 0
for i in range(len(positive)):
	count += positive[i] - 1
for j in range(len(negative)):
	count += -1 - negative[j]
if len(zero) > 0:
	count += len(zero)
elif len(negative) % 2 == 1:
	count += 2
print(count)


from operator import mul
from functools import reduce
n = int(input())
l = list(map(int, input().split()))
m = 0
for i in range(n):
	if l[i] < 0:
		m = m + abs(l[i] + 1)
		l[i] = -1
	elif l[i] > 0:
		m = m + abs(l[i] - 1)
		l[i] = 1
	else:
		m = m + 1
prod = reduce(mul, l, 1)
if prod == -1 and 0 not in l:
	m = m + 2
	print(m)
else:
	print(m)


import sys
input = sys.stdin.buffer.readline
from collections import defaultdict

def getlist():
	return list(map(int, input().split()))

def main():
	n = int(input())
	nums = getlist()
	rev = 0
	ans = 0
	haszero = False
	for num in nums:
		if num <= -1:
			ans += -1 - num
			rev += 1
		elif num >= 1:
			ans += num - 1
		else:
			ans += 1
			haszero = True
	if rev % 2 == 1 and (not haszero):
		ans += 2
	print(ans)
main()


n = int(input())
a = list(map(int, input().split()))
cnt = 0
o = {1: 0, -1: 0, 0: 0}
for i in a:
	if i != 0:
		cnt += abs(i) - 1
		if i < 0:
			o[-1] += 1
		else:
			o[1] += 1
	else:
		o[0] += 1
if o[-1] % 2 == 1:
	if o[0] == 0:
		cnt += 2
cnt += o[0]
print(cnt)


n = int(input())
arr = [int(x) for x in input().split()]
negc = 0
posc = 0
z = 0
for i in range(n):
	if arr[i] < 0:
		negc += 1
	elif arr[i] == 0:
		z += 1
		position = i
	else:
		posc += 1
coin = 0
if negc % 2 == 0:
	for i in range(n):
		if arr[i] == 0:
			coin += 1
		else:
			coin += abs(arr[i]) - 1
elif z == 0:
	coin += 2
	for i in range(n):
		coin += abs(arr[i]) - 1
else:
	for i in range(n):
		if arr[i] == 0:
			coin += 1
		else:
			coin += abs(arr[i]) - 1
print(coin)


n = int(input())
x = input()
y = x.split()
z = [int(d) for d in y]
no_negatives = []
no_positives = []
no_zeroes = []
count = 0
for i in z:
	if i > 0:
		no_positives.append(i)
	elif i < 0:
		no_negatives.append(i)
	else:
		no_zeroes.append(i)
if len(no_negatives) % 2 != 0:
	if len(no_zeroes) != 0:
		for i in no_negatives:
			count = count + abs(abs(i) - 1)
		for i in no_zeroes:
			count = count + 1
	else:
		for i in no_negatives:
			count = count + abs(abs(i) - 1)
		for i in no_zeroes:
			count = count + 1
		count = count + 2
elif len(no_negatives) % 2 == 0:
	for i in no_negatives:
		count = count + abs(abs(i) - 1)
	for i in no_zeroes:
		count = count + 1
for i in no_positives:
	if i == 0:
		pass
	else:
		count = count + i - 1
print(count)


n = int(input())
arr = list(map(int, input().split()))
coin = 0
noOfZero = 0
lessThanZero = 0
for i in range(n):
	if arr[i] > 0:
		coin += arr[i] - 1
	elif arr[i] == 0:
		noOfZero += 1
	else:
		coin -= arr[i] + 1
		lessThanZero += 1
if lessThanZero % 2 != 0 and noOfZero == 0:
	coin += 2
else:
	coin += noOfZero
print(coin)


from sys import stdin, stdout
n = stdin.readline()
a = list(map(int, stdin.readline().split()))
zero_flag = False
ans = 0
neg = 0
for i in a:
	if i <= -1:
		neg += 1
		ans += -1 - i
	elif i == 0:
		zero_flag = True
		ans += 1
	else:
		ans += i - 1
if neg % 2 != 0 and zero_flag == False:
	ans += 2
print(ans)


n = int(input())
l = list(map(int, input().split()))
sign = 0
k = 0
res = 0
for i in range(0, len(l)):
	if l[i] == 0:
		k += 1
	elif l[i] != -1 and l[i] != 1:
		if l[i] > 0:
			res += l[i] - 1
		else:
			res += -(l[i] + 1)
			sign += 1
	elif l[i] == -1:
		sign += 1
if sign % 2 == 0:
	if k > 0:
		res += k
elif k == 0:
	res += 2
else:
	res += k
print(res)


n = int(input())
a = [int(v) for v in input().split()]
p = 0
v = 0
q = 0
for j in range(n):
	if a[j] < 0:
		v = v + abs(a[j]) - 1
		p = p + 1
	elif a[j] == 0:
		q = q + 1
	else:
		v = v + abs(a[j] - 1)
v = v + q
if p % 2 != 0:
	if q == 0:
		v = v + 2
print(v)


n = input()
numbers = input().split()
coins = 0
zeros = 0
negatives = 0
for number in numbers:
	number = int(number)
	if number > 1:
		coins += number - 1
	elif number == 0:
		zeros += 1
	elif number < 0:
		coins += abs(1 + number)
		negatives += 1
if negatives % 2 and (not zeros):
	coins += 2
else:
	coins += zeros
print(coins)


n = int(input())
a = []
c1 = 0
c2 = 0
t1 = 0
t3 = 0
a = str(input()).split()
for i in range(n):
	a[i] = int(a[i])
	if a[i] < 0:
		c1 = c1 + a[i] * -1 - 1
		t1 += 1
	if a[i] > 0:
		c2 = c2 + a[i] - 1
	if a[i] == 0:
		t3 += 1
if t1 % 2 == 0:
	print(c1 + c2 + t3)
elif t3 == 0:
	print(c1 + c2 + 2)
else:
	print(c1 + c2 + t3)


n = int(input())
l1 = list(map(int, input().split()))
countn = 0
co = 0
count = 0
for i in l1:
	if i > 0:
		count = count + i - 1
	elif i < 0:
		countn += 1
		count = count - i - 1
	else:
		co = co + 1
if co != 0:
	count += co
elif countn % 2 == 1:
	count += 2
print(count)


n = int(input())
arr = [int(d) for d in input().split()]
mov = 0
n = 0
cero = False
for i in arr:
	if i > 0:
		mov = mov + (i - 1)
	elif i == 0:
		mov += 1
		cero = True
	else:
		mov = mov + (i + 1) * -1
		n += 1
if n % 2 == 1:
	if cero == True:
		print(mov)
	else:
		print(mov + 2)
else:
	print(mov)


import sys
import math
strInp = lambda : input().strip().split()
intInp = lambda : list(map(int, strInp()))
n = int(input())
arr = intInp()
zeroCount = 0
ans = 0
oddCount = 0
for i in arr:
	if i <= 0:
		ans += abs(i + 1)
		oddCount += 1
	else:
		ans += abs(i - 1)
	if i == 0:
		zeroCount += 1
if oddCount % 2 != 0:
	if zeroCount > 0:
		ans += 0
	else:
		ans += 2
print(ans)


n = int(input())
arr = list(map(int, input().split()))
neg = 0
zeros = 0
tot = 0
for i in range(n):
	if arr[i] < 0:
		neg += 1
		tot += -1 - arr[i]
	elif arr[i] > 0:
		tot += arr[i] - 1
	else:
		tot += 1
		zeros += 1
if neg % 2 == 0 or zeros > 0:
	print(tot)
else:
	print(tot + 2)


n = int(input())
seq = list(map(int, input().split(' ')))
change_count = 0
product = 1
zero_count = 0
for i in seq:
	if i > 1:
		change_count += i - 1
	elif i < -1:
		change_count += -1 - i
		product *= -1
	elif i == 0:
		zero_count += 1
	elif i == -1:
		product *= -1
if zero_count > 0:
	change_count += zero_count
	product = 1
if product == -1:
	change_count += 2
print(change_count)


N = int(input())
Coins = Zeros = Positives = Negatives = 0
for Coin in [int(i) for i in input().split()]:
	if Coin == 0:
		Zeros += 1
		continue
	elif Coin > 0:
		Positives += 1
		Coins += Coin - 1
	else:
		Negatives += 1
		Coins += -1 - Coin
if Negatives % 2 == 1 and (not Zeros):
	print(Coins + 2)
else:
	print(Coins + Zeros)


n = int(input())
a = list(map(int, input().strip().split()))
cneg = 0
cpos = 0
czero = 0
cost = 0
for i in a:
	if i < 0:
		cost += -1 - i
		cneg += 1
	elif i > 0:
		cost += i - 1
		cpos += 1
	else:
		czero += 1
if cneg % 2 == 1:
	if czero > 0:
		czero -= 1
		cost += 1
	else:
		cost += 2
cost += czero
print(cost)


n = int(input())
s = 1
k = 0
coin = 0
A = list(map(int, input().split()))
for elem in A:
	if elem > 1:
		coin += elem - 1
	elif elem < -1:
		coin += abs(elem) - 1
		s *= -1
	elif elem == -1:
		s *= -1
	elif elem == 0:
		k += 1
if s == 1 or (s == -1 and k != 0):
	print(coin + k)
else:
	print(coin + 2)


from math import *
n = int(input())
arr = [int(x) for x in input().split()]
mul = 1
sum = 0
zf = False
for i in arr:
	sum += abs(i) - 1 if i != 0 else 1
	mul *= -1 if i < 0 else 1
	if i == 0:
		zf = True
sum += 2 if mul == -1 and (not zf) else 0
print(sum)


import sys
sys.stdin.readline
n = int(input())
arr = list(map(int, input().split()))
cnt = 0
zero = 0
mi = 0
for i in range(n):
	if arr[i] < 0:
		cnt += -(arr[i] + 1)
		mi += 1
	elif arr[i] > 0:
		cnt += arr[i] - 1
	else:
		zero += 1
if zero:
	cnt += zero
elif mi % 2:
	cnt += 2
print(cnt)


n_numbers = int(input())
numbers = [int(i) for i in input().split(' ')]
n_coins = 0
n_negative = 0
n_zeros = 0
for i in numbers:
	if i < 0:
		n_coins += -1 - i
		n_negative += 1
	elif i == 0:
		n_coins += 1
		n_zeros += 1
	else:
		n_coins += i - 1
if n_negative % 2 != 0 and n_zeros == 0:
	n_coins += 2
print(n_coins)


import math, string, itertools, fractions, heapq, collections, re, array, bisect, sys, copy, functools
sys.setrecursionlimit(10 ** 7)
inf = 10 ** 20
eps = 1.0 / 10 ** 10
mod = 10 ** 9 + 7
mod2 = 998244353
dd = [(-1, 0), (0, 1), (1, 0), (0, -1)]
ddn = [(-1, 0), (-1, 1), (0, 1), (1, 1), (1, 0), (1, -1), (0, -1), (-1, -1)]

def LI():
	return list(map(int, sys.stdin.readline().split()))

def LLI():
	return [list(map(int, l.split())) for l in sys.stdin.readlines()]

def LI_():
	return [int(x) - 1 for x in sys.stdin.readline().split()]

def LF():
	return [float(x) for x in sys.stdin.readline().split()]

def LS():
	return sys.stdin.readline().split()

def I():
	return int(sys.stdin.readline())

def F():
	return float(sys.stdin.readline())

def S():
	return input()

def pf(s):
	return print(s, flush=True)

def pe(s):
	return print(str(s), file=sys.stderr)

def JA(a, sep):
	return sep.join(map(str, a))

def JAA(a, s, t):
	return s.join((t.join(map(str, b)) for b in a))

def IF(c, t, f):
	return t if c else f

def main():
	t = 1
	rr = []
	for _ in range(t):
		n = I()
		a = LI()
		r = 0
		mc = 0
		zc = 0
		for c in a:
			if c < 0:
				mc += 1
				r += -1 - c
			elif c > 0:
				r += c - 1
			else:
				r += 1
				zc += 1
		if mc % 2 == 1 and zc == 0:
			r += 2
		rr.append(r)
	return JA(rr, '\n')
print(main())


n = int(input())
(ans, nomo, noz) = (0, 0, 0)
A = list(map(int, input().split()))
for a in A:
	if a < 0:
		ans += -1 - a
		nomo += 1
	elif a > 0:
		ans += a - 1
	else:
		noz += 1
if nomo % 2 != 0:
	if noz > 0:
		ans += 1
		noz -= 1
	else:
		ans += 2
ans += noz
print(ans)


n = int(input())
arr = list(map(int, input().split()))
arr = sorted(arr)
i = 0
moves = 0
while i < n:
	if i == n - 1:
		d1 = abs(1 - arr[i])
		moves += d1
		break
	if arr[i] < 0:
		d1 = abs(-1 - arr[i])
		d2 = abs(-1 - arr[i + 1])
		moves += d1 + d2
		i += 2
	else:
		d = abs(arr[i] - 1)
		moves += d
		i += 1
print(moves)


n = int(input())
a = list(map(int, input().split(' ')))
coins = 0
num_neg = 0
num_zero = 0
for e in a:
	if e < 0:
		num_neg += 1
		coins += -e - 1
	elif e > 0:
		coins += e - 1
	else:
		num_zero += 1
		coins += 1
if num_neg % 2 == 0:
	print(coins)
elif num_zero > 0:
	print(coins)
else:
	print(coins + 2)


n = int(input())
arr = input().split()
a = [int(x) for x in arr]
INF = 1061109567
tab = [[INF for i in range(2)] for j in range(n + 1)]
tab[0][0] = 0
for i in range(1, n + 1):
	pos = abs(1 - a[i - 1])
	neg = abs(-1 - a[i - 1])
	for j in range(2):
		tab[i][j] = min(tab[i - 1][j] + pos, tab[i - 1][not j] + neg)
print(tab[n][0])


n = int(input())
a = [int(x) for x in str(input()).split(' ')]
coins = 0
eo = sum((y < 0 for y in a))
for x in a:
	if x == 0:
		coins += 1
	else:
		coins += x - 1 if x > 0 else -x - 1
if a.count(0) == 0 and eo % 2 != 0:
	coins += 2
print(coins)


n1 = int(input())
a = list(map(int, input().split()))
c = 0
n = 0
p = 0
for i in a:
	if i < 0:
		n += 1
	elif i > 0:
		p += 1
for i in a:
	if i < 0:
		c += -1 - i
	elif i > 0:
		c += i - 1
	elif i == 0:
		c += 1
		if n % 2 == 0:
			p += 1
		else:
			n += 1
if n % 2 != 0:
	c += 2
print(c)


n = int(input())
l = list(map(int, input().split()))
s = 0
neg = 0
for i in l:
	s += abs(abs(i) - 1)
	if i < 0:
		neg += 1
if neg % 2 == 0:
	print(s)
elif 0 in l:
	print(s)
else:
	s += 2
	print(s)


from sys import stdin
input = stdin.readline
n = int(input())
a = [int(i) for i in input().split()]
num_neg = 0
num_zero = 0
cost = 0
for i in range(n):
	if a[i] == 0:
		cost += 1
		num_zero += 1
	elif a[i] < 0:
		num_neg += 1
		cost += -1 - a[i]
	else:
		cost += a[i] - 1
if num_zero > 0:
	print(cost)
elif num_neg % 2 == 1:
	print(cost + 2)
else:
	print(cost)


import sys
input = sys.stdin.readline

def getInt():
	return int(input())

def getVars():
	return map(int, input().split())

def getArr():
	return list(map(int, input().split()))

def getStr():
	return input().strip()
N = getInt()
A = getArr()
res = 0
k = 1
for i in range(N):
	res += abs(abs(A[i]) - 1)
	if A[i] == 0:
		k = 0
	if A[i] <= -1:
		k *= -1
if k >= 0:
	print(res)
else:
	print(res + 2)


n = int(input())
nums = list(map(int, input().split()))
total = 0
nm_neg = 0
nm_zeros = 0
for i in range(len(nums)):
	if nums[i] < 0:
		total += -nums[i] - 1
		nm_neg += 1
	elif nums[i] > 0:
		total += nums[i] - 1
	else:
		nm_zeros += 1
if nm_zeros == 0:
	if nm_neg % 2 == 0:
		print(total)
	else:
		print(total + 2)
else:
	print(total + nm_zeros)


input()
n = z = 0
k = 0
for x in map(int, input().split()):
	if x < 0:
		k += -x - 1
		n += 1
	elif x > 0:
		k += x - 1
	else:
		k += 1
		z += 1
print(k + (not z and n % 2) * 2)


a = int(input())
b = list(map(int, input().split()))
c = 0
d = 0
e = 0
for i in range(len(b)):
	if b[i] > 0:
		c += b[i] - 1
	elif b[i] < 0:
		c += abs(b[i]) - 1
		e += 1
	elif b[i] == 0:
		d += 1
if e % 2 == 0:
	print(c + d)
elif e % 2 != 0:
	if d % 2 != 0:
		print(c + d)
	elif d >= 1:
		print(c + d)
	elif d == 0:
		print(c + 2)


n = int(input())
a = list(map(int, input().split()))
l = []
(c, p) = (0, 0)
for i in range(n):
	if a[i] < 0:
		c = c + 1
	if a[i] == 0:
		p = p + 1
for i in range(n):
	x = abs(a[i] - 1)
	y = abs(a[i] + 1)
	z = min(x, y)
	l.append(z)
if c % 2 == 0:
	print(sum(l))
elif c % 2 != 0 and p % 2 != 0:
	print(sum(l))
elif c % 2 != 0 and p % 2 == 0 and (p > 0):
	print(sum(l))
else:
	print(sum(l) + 2)


N = int(input())
a = list(map(int, input().rstrip().split()))
a = sorted(a)
x = [0 for i in range(len(a))]
for i in range(len(a)):
	if abs(a[i] - 1) > abs(a[i] + 1):
		x[i] = 1
	else:
		x[i] = 0
if sum(x) % 2 != 0:
	_min = float('inf')
	_amin = -1
	for i in range(len(a)):
		if max(abs(a[i] - 1), abs(a[i] + 1)) < _min:
			_min = max(abs(a[i] - 1), abs(a[i] + 1))
			_amin = i
	cost = 0
	for i in range(len(a)):
		if _amin == i:
			cost = cost + max(abs(a[i] - 1), abs(a[i] + 1))
			continue
		if x[i] == 1:
			cost = cost + abs(a[i] + 1)
		else:
			cost = cost + abs(a[i] - 1)
	print(cost)
else:
	cost = 0
	for i in range(len(a)):
		if x[i] == 1:
			cost = cost + abs(a[i] + 1)
		else:
			cost = cost + abs(a[i] - 1)
	print(cost)


def main():
	n1 = input()
	val = list((int(v) for v in input().split()))
	sum = 0
	mul = 0
	zeros = 0
	for v in val:
		if v < 0:
			sum += abs(-1 - v)
			if mul == 0:
				mul = 1
			mul *= -1
		elif v == 0:
			zeros += 1
		else:
			sum += abs(1 - v)
			if mul == 0:
				mul = 1
			mul *= 1
	if mul == -1:
		if zeros != 0:
			sum += zeros
		else:
			sum += 2
	elif mul == 1:
		if zeros != 0:
			sum += zeros
	else:
		sum += zeros
	print(sum)
main()


from __future__ import division, print_function
from fractions import Fraction
import sys
import os
from io import BytesIO, IOBase
from itertools import *
import bisect
from heapq import *
from math import *
from copy import *
from collections import deque
from collections import Counter as counter
from itertools import combinations as comb
from itertools import permutations as permutate
from bisect import bisect_left as bl
from bisect import bisect_right as br
from bisect import bisect
BUFSIZE = 8192

class FastIO(IOBase):
	newlines = 0

	def __init__(self, file):
		self._fd = file.fileno()
		self.buffer = BytesIO()
		self.writable = 'x' in file.mode or 'r' not in file.mode
		self.write = self.buffer.write if self.writable else None

	def read(self):
		while True:
			b = os.read(self._fd, max(os.fstat(self._fd).st_size, BUFSIZE))
			if not b:
				break
			ptr = self.buffer.tell()
			(self.buffer.seek(0, 2), self.buffer.write(b), self.buffer.seek(ptr))
		self.newlines = 0
		return self.buffer.read()

	def readline(self):
		while self.newlines == 0:
			b = os.read(self._fd, max(os.fstat(self._fd).st_size, BUFSIZE))
			self.newlines = b.count(b'\n') + (not b)
			ptr = self.buffer.tell()
			(self.buffer.seek(0, 2), self.buffer.write(b), self.buffer.seek(ptr))
		self.newlines -= 1
		return self.buffer.readline()

	def flush(self):
		if self.writable:
			os.write(self._fd, self.buffer.getvalue())
			(self.buffer.truncate(0), self.buffer.seek(0))

class IOWrapper(IOBase):

	def __init__(self, file):
		self.buffer = FastIO(file)
		self.flush = self.buffer.flush
		self.writable = self.buffer.writable
		self.write = lambda s: self.buffer.write(s.encode('ascii'))
		self.read = lambda : self.buffer.read().decode('ascii')
		self.readline = lambda : self.buffer.readline().decode('ascii')

def print(*args, **kwargs):
	(sep, file) = (kwargs.pop('sep', ' '), kwargs.pop('file', sys.stdout))
	at_start = True
	for x in args:
		if not at_start:
			file.write(sep)
		file.write(str(x))
		at_start = False
	file.write(kwargs.pop('end', '\n'))
	if kwargs.pop('flush', False):
		file.flush()
if sys.version_info[0] < 3:
	(sys.stdin, sys.stdout) = (FastIO(sys.stdin), FastIO(sys.stdout))
else:
	(sys.stdin, sys.stdout) = (IOWrapper(sys.stdin), IOWrapper(sys.stdout))
from types import GeneratorType

def iterative(f, stack=[]):

	def wrapped_func(*args, **kwargs):
		if stack:
			return f(*args, **kwargs)
		to = f(*args, **kwargs)
		while True:
			if type(to) is GeneratorType:
				stack.append(to)
				to = next(to)
				continue
			stack.pop()
			if not stack:
				break
			to = stack[-1].send(to)
		return to
	return wrapped_func
mod = 1000000007

def inp():
	return sys.stdin.readline().rstrip('\r\n')

def out(var):
	sys.stdout.write(str(var))

def lis():
	return list(map(int, inp().split()))

def stringlis():
	return list(map(str, inp().split()))

def sep():
	return map(int, inp().split())

def strsep():
	return map(str, inp().split())

def zerolist(n):
	return [0] * n

def nextline():
	out('\n')

def testcase(t):
	for p in range(t):
		solve()

def printlist(a):
	for p in range(0, len(a)):
		out(str(a[p]) + ' ')

def solve():
	n = int(inp())
	ar = lis()
	c = ar.count(0)
	ans = 0
	p = 1
	for i in ar:
		if abs(i - 1) < abs(i + 1):
			p *= 1
			ans += abs(i - 1)
		else:
			p *= -1
			ans += abs(i + 1)
	if c > 0:
		print(ans)
	elif p == 1:
		print(ans)
	else:
		print(ans + 2)
solve()


n = int(input())
a = list(map(int, input().split()))
s = l = r = m = 0
for i in a:
	if i <= -1:
		s += -1 - i
		l += 1
	elif i >= 1:
		s += i - 1
		r += 1
	else:
		m += 1
if m != 0 or l % 2 == 0:
	print(s + m)
else:
	print(s + 2)


n = int(input())
a = list(map(int, input().split()))
c = 0
z = 0
res = 0
a.sort()
for i in range(0, n):
	if a[i] < 0:
		c += 1
	elif a[i] == 0:
		z = 1
		break
if c > 0:
	for i in range(0, c):
		res = res + abs(a[i] + 1)
	for i in range(c, n):
		if a[i] == 0:
			res += 1
		else:
			res += abs(a[i] - 1)
	if c % 2 != 0:
		res += 2
		if z == 1:
			res -= 2
else:
	for i in range(0, n):
		res += abs(a[i] - 1)
print(res)


def arr_inp():
	return [int(x) for x in input().split()]
(n, a, ans, pos, neg) = (int(input()), arr_inp(), 0, 0, 0)
for i in a:
	if i < 0:
		neg += 1
	if i == 0:
		pos += 1
	ans += abs(abs(i) - 1)
if neg % 2:
	if pos == 0:
		ans += 2
print(ans)


n = int(input())
list = [int(x) for x in input().split()]
po = 0
ne = 0
ze = 0
coins = 0
for i in list:
	if i > 0:
		coins += i - 1
		po += 1
	elif i < 0:
		coins += -1 - i
		ne += 1
	else:
		ze += 1
if ze != 0:
	coins += ze
elif ne % 2 != 0:
	coins += 2
print(coins)


n = int(input())
nums = input().split(' ')
nums = list(map(int, nums))
negs = 0
cost = 0
solves = {1: 0}
for i in nums:
	if i < 0:
		negs = negs + 1
	i = abs(i)
	if i in solves:
		cost = cost + solves[i]
	else:
		solves[i] = abs(i - 1)
		cost = cost + solves[i]
if negs % 2 != 0 and 0 not in solves:
	cost = cost + 2
print(cost)


n = int(input())
q = list(map(int, input().split()))
(ans, p, z) = (0, 0, 0)
for i in range(n):
	if q[i] > 0:
		ans += abs(1 - q[i])
	elif q[i] < 0:
		ans += abs(-1 - q[i])
		p += 1
	else:
		z += 1
if p % 2 != 0:
	if z != 0:
		print(ans + z)
	else:
		print(ans + 2)
else:
	print(ans + z)


n = int(input())
arr = list(map(int, input().split()))
coins = 0
prod = 1
eq = 0
for i in arr:
	if abs(i - 1) > abs(i + 1):
		coins += abs(i + 1)
		prod *= -1
	elif abs(i - 1) == abs(i + 1):
		eq += 1
		coins += 1
		prod *= -1
	else:
		coins += abs(i - 1)
		prod *= 1
if prod == -1 and eq == 0:
	coins += 2
print(coins)


n = int(input())
a = list(map(int, input().split()))
count = 0
neg = 0
flag = False
for i in a:
	if i > 0:
		count += i - 1
	elif i < 0:
		count += -i - 1
		neg += 1
	else:
		count += 1
		flag = True
if not flag:
	if neg % 2 == 1:
		count += 2
print(count)


n = int(input())
arr = list(map(int, input().strip().split()))
dp = [0] * n
p = 1
c = 0
for i in range(n):
	if arr[i] > 0:
		dp[i] = arr[i] - 1
		p = p * 1
	if arr[i] < 0:
		dp[i] = abs(arr[i]) - 1
		p = p * -1
	if arr[i] == 0:
		c += 1
if c == 0:
	if p == 1:
		print(sum(dp))
	else:
		print(sum(dp) + 2)
else:
	print(sum(dp) + c)


n = int(input())
a = list(map(int, input().split()))
(z, no, c) = (0, 0, 0)
for i in range(n):
	if a[i] > 0:
		c += a[i] - 1
	elif a[i] < 0:
		no += 1
		c += abs(a[i]) - 1
	else:
		z += 1
if no % 2 != 0 and z > 0:
	c += z
elif no % 2 != 0 and z == 0:
	c += 2
else:
	c += z
print(c)


n = int(input())
a = list(map(int, input().split()))
m = 0
c = 0
q = 0
for i in range(n):
	d1 = abs(a[i] - 1)
	d2 = abs(a[i] + 1)
	if d1 < d2:
		c += d1
		a[i] = 1
	elif d1 > d2:
		m += 1
		c += d2
		a[i] = 1
	else:
		q += 1
		c += d1
if m % 2 and q == 0:
	c += 2
print(c)


n = int(input())
allElements = [int(i) for i in input().split()]
minimumCoins = 0
negativeCount = 0
positiveCount = 0
zeroCount = 0
for item in allElements:
	if item != 0:
		minimumCoins = minimumCoins + abs(item) - 1
		if item < 0:
			negativeCount = negativeCount + 1
		elif item > 0:
			positiveCount = positiveCount + 1
	elif item == 0:
		minimumCoins = minimumCoins + 1
		zeroCount = zeroCount + 1
if negativeCount % 2 != 0:
	if zeroCount > 0:
		minimumCoins = minimumCoins + 0
	elif zeroCount == 0:
		minimumCoins = minimumCoins + 2
print(minimumCoins)


n = int(input())
a = list(map(int, input().split()))
c = 0
prd = 1
c_z = 0
for i in range(n):
	if a[i] < 0:
		c += -1 - a[i]
		a[i] = -1
		prd *= -1
	elif a[i] > 0:
		c += a[i] - 1
		a[i] = 1
		prd *= 1
	else:
		c_z += 1
if c_z == 0:
	if prd < 0:
		print(c + 2)
	else:
		print(c)
else:
	print(c + c_z)


n = int(input())
a = [int(x) for x in input().split()]
ans = 0
neg = 0
zero = 0
for i in range(n):
	if a[i] < 0:
		ans += abs(a[i] + 1)
		a[i] = -1
		neg += 1
	elif a[i] > 0:
		ans += abs(a[i] - 1)
		a[i] = 1
	else:
		zero += 1
if neg % 2 == 1:
	if zero > 0:
		ans += zero
	else:
		ans += 2
else:
	ans += zero
print(ans)


n = int(input())
arr = list(map(int, input().split()))
arr = sorted(arr)
s = 0
flag = 0
ev_odd = 0
for i in arr:
	if i == 0:
		flag = 1
		break
if flag == 1:
	for i in arr:
		if i < 0:
			s += abs(i + 1)
		elif i >= 0:
			s += abs(i - 1)
	print(s)
else:
	for i in arr:
		if i < 0:
			ev_odd += 1
			s += abs(i + 1)
		elif i > 0:
			s += abs(i - 1)
	if ev_odd % 2 != 0:
		s += 2
		print(s)
	else:
		print(s)


n = int(input())
l = list(map(int, input().split()))
c0 = 0
c1 = 0
c11 = 0
for i in range(0, n):
	if l[i] < -1:
		c11 += -1 - l[i]
		l[i] += 1 * (-1 - l[i])
	elif l[i] > 1:
		c1 += -1 + l[i]
		l[i] += -1 * (-1 + l[i])
if l.count(-1) % 2 != 0 and 0 in l:
	c0 += 1
	l[l.index(0)] = -1
elif l.count(-1) % 2 != 0 and 0 not in l:
	c11 += 2
	l[l.index(-1)] = 1
c0 += l.count(0)
print(c0 + c11 + c1)


input()
a = list(map(int, input().split()))
flag = False
tmp = True
ans = 0
for i in a:
	if i > 0:
		ans += i - 1
		continue
	if i < 0:
		tmp = not tmp
		ans += -1 - i
		continue
	flag = True
	ans += 1
print(ans if flag or tmp else ans + 2)


n = int(input())
l = list(map(int, input().split(' ')))
(l1, count) = ([], 0)
(res, count) = (0, 0)
l2 = []
for i in range(n):
	if l[i] < 0:
		l1.append(l[i])
	elif l[i] == 0:
		count += 1
	else:
		l2.append(l[i])
for i in range(len(l1)):
	res += abs(l1[i]) - 1
for i in range(len(l2)):
	res += l2[i] - 1
if len(l1) % 2 != 0 and count == 0:
	res += 2
print(res + count)


n = int(input())
l = list(map(int, input().split()))
s = 1
t = 0
rep = 0
for i in range(n):
	if l[i] < -1:
		rep += -1 - l[i]
		s = s * -1
	elif l[i] > 1:
		rep += l[i] - 1
		s += s * 1
	elif l[i] == 0:
		t += 1
	else:
		s *= l[i]
if t == 0:
	if s < 0:
		rep += 2
elif s < 0:
	rep = rep + 1 + t - 1
else:
	rep = rep + t
print(rep)


inp = int(input())
l = list(map(int, input().split()))
(minus_num, zero, sum) = (0, l.count(0), 0)
for t in l:
	if t < 0:
		minus_num += 1
for num in l:
	if num < 0:
		sum += abs(num + 1)
	else:
		sum += abs(num - 1)
if zero >= 1 or minus_num % 2 == 0:
	print(sum)
else:
	print(sum + 2)


n = int(input())
l = list(map(int, input().split()))
sol = 0
zeros = 0
down = 0
for i in l:
	if i >= 1:
		sol += i - 1
	elif i <= -1:
		down += 1
		sol += abs(i) - 1
	else:
		zeros += 1
if zeros == 0 and down % 2 == 1:
	sol += 2
else:
	sol += zeros
print(sol)


from functools import reduce

def mult(numeros):
	return reduce(lambda x, y: x * y, numeros)
input()
a = sorted(list(map(int, input().split())))
b = list(map(lambda x: -1 if x < 0 else 2 if x == 0 else 1, a))
if mult(b) < 0:
	if 2 in b:
		b[b.index(2)] = -1
	else:
		b = b[1:] + [1]
b = [1 if x == 2 else x for x in b]
print(sum([abs(x - y) for (x, y) in zip(a, b)]))


n = int(input())
a = list(map(int, input().split()))
ans = 0
for i in range(n):
	if a[i] < 0:
		ans += -1 - a[i]
		a[i] = -1
	elif a[i] > 0:
		ans += a[i] - 1
		a[i] += -1 + a[i]
x = a.count(-1)
y = a.count(1)
z = a.count(0)
if x % 2 == 0:
	print(ans + z)
elif z >= 1:
	print(ans + z)
else:
	print(ans + 2)


def whats(a):
	stepNegatives = 0
	stepPositives = 0
	negativeNumbers = 0
	stepZero = 0
	for number in a:
		if number < 0:
			negativeNumbers += 1
			stepNegatives += abs(number) - 1
		elif number > 0:
			stepPositives += number - 1
		else:
			stepZero += 1
	if negativeNumbers % 2 == 0:
		cost = stepNegatives + stepPositives + stepZero
	elif negativeNumbers % 2 != 0 and stepZero != 0:
		cost = stepNegatives + stepPositives + stepZero
	else:
		cost = stepNegatives + stepPositives + stepZero + 2
	return cost
n = int(input())
a = list(map(int, input().split()))
print(whats(a))


N = int(input())
List = [int(x) for x in input().split()]
Adv = 0
if List.count(0) >= 1:
	Adv = 1
Ans = 0
Neg = 0
for i in range(N):
	if List[i] < 0:
		Ans += -List[i] - 1
		Neg += 1
	elif List[i] == 0:
		Ans += 1
	else:
		Ans += List[i] - 1
if not Neg & 1:
	print(Ans)
elif Adv:
	print(Ans)
else:
	print(Ans + 2)


from functools import reduce
n = int(input())
a = [int(num) for num in input().split()]
add_subtract = 0
has_zero = 0 in a
if n == 1:
	add_subtract = abs(a[0] - 1)
else:
	for (i, num) in enumerate(a):
		if num >= 0:
			add_subtract += abs(num - 1)
			a[i] = 1
		else:
			add_subtract += abs(-1 - num)
			a[i] = -1
	if not has_zero and reduce(lambda x, y: x * y, a) != 1:
		add_subtract += 2
print(add_subtract)


n = int(input())
u = list(map(int, input().split()))
s = 0
y = 0
zer = 0
for i in u:
	if i <= -1:
		y += 1
		s += abs(i + 1)
	elif i >= 1:
		s += abs(i - 1)
	else:
		zer += 1
		s += 1
if y % 2 != 0:
	s += 2
	if zer != 0:
		s -= 2
print(s)


N = int(input())
x = list(map(int, input().split()))
ans = 0
zeros = 0
pos_count = 0
neg_count = 0
for k in range(N):
	if x[k] < 0:
		ans += -1 - x[k]
		neg_count += 1
	elif x[k] > 0:
		ans += x[k] - 1
		pos_count += 1
	else:
		zeros += 1
if neg_count % 2 != 0:
	if zeros > 0:
		ans += zeros
		zeros = 0
	else:
		ans += 2
ans += zeros
print(ans)


n = int(input())
a = list(map(int, input().split()))
prod = 1
ans = 0
count = 0
for num in a:
	if num < 0:
		ans += abs(num + 1)
		prod *= -1
	elif num > 0:
		ans += num - 1
	else:
		count += 1
if count > 0:
	ans += count
elif prod == -1:
	ans += 2
print(ans)


n = int(input())
a = list(map(int, input().split()))
negative = 0
cou = 0
zeros = 0
for i in a:
	if i == 0:
		zeros += 1
	else:
		if i < 0:
			negative += 1
		cou += abs(i) - 1
if zeros == 0 and negative % 2 == 1:
	print(cou + 2)
else:
	print(cou + zeros)


n = int(input())
A = list((int(i) for i in input().split()))
moves = 0
z = 0
u = 0
v = 0
for ele in A:
	if ele == 0:
		z += 1
	if ele <= -1:
		moves += abs(ele) - 1
		v += 1
	if ele >= 1:
		moves += ele - 1
		u += 1
moves += z
if z == 0:
	if v % 2 != 0:
		moves += 2
print(moves)


n = int(input())
l = list(map(int, input().split()))
l1 = list(filter(lambda i: i != 1 and i > 0, l))
l2 = list(filter(lambda i: i <= 0, l))
counter = 0
for i in l1:
	counter = counter + i - 1
if len(l2) % 2 == 0:
	for i in l2:
		if i < 0:
			counter += -1 - i
		else:
			counter += 1 - i
else:
	m = max(l2)
	counter += 1 - m
	l2.remove(m)
	for i in l2:
		if i < 0:
			counter += -1 - i
		else:
			counter += 1 - i
print(counter)


def fun(a, l):
	a = sorted(a)
	i = 0
	su = 0
	x = 0
	le = 0
	o = 0
	if l == 1:
		if a[0] < 0:
			return 1 - a[0]
	while i < l and a[i] < -1:
		su += abs(a[i]) - 1
		i += 1
		le += 1
	while i < l and a[i] == -1:
		i += 1
		le += 1
	while i < l and a[i] == 0:
		su += 1
		i += 1
		o = 1
	while i < l and a[i] == 1:
		i += 1
	while i < l and a[i] > 1:
		su += a[i] - 1
		i += 1
	if o:
		return su
	if le % 2:
		su += 2
	return su
x = int(input())
y = list(map(int, input().split()))
print(fun(y, x))


n = int(input())
a = list(map(int, input().split()))
neg = 0
ex = False
for i in a:
	if i < 0:
		neg += 1
if neg & 1 == 0:
	ans = 0
	for i in a:
		if i >= 0:
			ans += abs(i - 1)
		else:
			ans += abs(i - -1)
else:
	ans = 0
	for i in a:
		if i < 0:
			ans += abs(i - -1)
		elif i == 0 and ex == False:
			ex = True
			ans += 1
		else:
			ans += abs(i - 1)
	if ex == False:
		ans += 2
print(ans)


n = int(input())
a = list(map(int, input().split()))
cost = 0
v = [0 for _ in range(3)]
for i in range(n):
	if a[i] <= -1:
		cost += -1 - a[i]
		a[i] = -1
		v[0] += 1
	elif a[i] >= 1:
		cost += a[i] - 1
		a[i] = 1
		v[2] += 1
	else:
		v[1] += 1
if v[0] % 2 == 1:
	if v[1] > 0:
		v[1] -= 1
		cost += 1
	else:
		v[0] -= 1
		cost += 2
cost += v[1]
print(cost)


n = int(input())
t = list(map(int, input().split()))
c = d = 0
j = {'0': 0, '-1': 0}
for i in t:
	if i > 0:
		c += i - 1
	elif i < 0:
		c += -i - 1
		j['-1'] += 1
	else:
		c += 1
		j['0'] += 1
if j['-1'] % 2 != 0 and j['0'] == 0:
	c += 2
print(c)


n = int(input())
a = list(map(int, input().split()))
pos = 0
neg = 0
zero = 0
ans = 0
for i in range(n):
	if a[i] > 0:
		ans += a[i] - 1
		pos += 1
	elif a[i] < 0:
		ans += -1 * (a[i] + 1)
		neg += 1
	else:
		zero += 1
		ans += 1
if zero == 0 and neg % 2 != 0:
	print(ans + 2)
else:
	print(ans)


n = int(input())
S = [int(i) for i in input().split()]
mon = 0
pnd = 0
rr = 1
for i in range(len(S)):
	if S[i] > 1:
		mon += S[i] - 1
		S[i] = 1
	elif S[i] == 1:
		S[i] = 1
	elif S[i] == 0:
		mon += 1
		pnd = 1
		S[i] = 1
	elif S[i] == -1:
		S[i] = -1
	else:
		mon += abs(S[i] + 1)
		S[i] = -1
	rr *= S[i]
if rr == 1:
	print(mon)
elif pnd == 0:
	print(mon + 2)
else:
	print(mon)


input()
arr = list(map(int, input().split()))
cool = False
total = 0
sign = 1
for i in range(len(arr)):
	if arr[i] == 0:
		cool = True
		total += 1
	elif arr[i] > 0:
		total += arr[i] - 1
	else:
		total += -arr[i] - 1
		sign *= -1
if sign < 0:
	if not cool:
		total += 2
print(total)


n = int(input())
(x, y, z) = (0, 0, 0)
s = 0
for a in map(int, input().split()):
	if a > 0:
		x += 1
		s += a - 1
	elif a < 0:
		y += 1
		s += -1 - a
	else:
		z += 1
if y % 2:
	if z:
		s += 1
		z -= 1
	else:
		s += 2
print(s + z)


from sys import stdin, stdout
n = int(stdin.readline())
a = list(map(int, stdin.readline().split()))
ans = 0
neg = z = 0
for i in range(n):
	if a[i] < 0:
		ans += -(a[i] + 1)
		neg += 1
	elif a[i] > 0:
		ans += a[i] - 1
	else:
		z += 1
if neg & 1 == 1:
	if z == 0:
		ans += 2
	print(ans + z)
else:
	print(ans + z)


def solve():
	n = int(input())
	arr = list(map(int, input().split()))
	positives = [abs(1 - arr[index]) for index in range(n)]
	negatives = [abs(-1 - arr[index]) for index in range(n)]
	count = 0
	total = sum(positives)
	delta = []
	for index in range(n):
		if negatives[index] <= positives[index]:
			delta.append(positives[index] - negatives[index])
	delta.sort(reverse=True)
	while len(delta) >= 2:
		total -= delta.pop(0) + delta.pop(0)
	print(total)
solve()


q = int(input())
arr = list(map(int, input().split()))
ans = 0
count_negative = 0
count_zero = 0
for i in range(len(arr)):
	if arr[i] < 0:
		count_negative += 1
	if arr[i] == 0:
		count_zero += 1
	ans += abs(abs(arr[i]) - 1)
if count_negative % 2 == 0:
	print(ans)
elif count_zero > 0:
	print(ans)
else:
	print(ans + 2)


n = int(input())
a = [int(x) for x in input().split()]
br = 0
brnula = 0
brneg = 0
brpoz = 0
for x in a:
	if x == 0:
		brnula += 1
	if x > 0:
		br += x - 1
		brpoz += 1
	if x < 0:
		br += -x - 1
		brneg += 1
if brneg % 2 == 0 or brnula > 0:
	print(br + brnula)
else:
	print(br + 2)


import sys
from random import choice, randint
inp = sys.stdin.readline
out = sys.stdout.write
flsh = sys.stdout.flush
sys.setrecursionlimit(10 ** 9)
inf = 10 ** 20
eps = 1.0 / 10 ** 10
mod = 10 ** 9 + 7
dd = [(-1, 0), (0, 1), (1, 0), (0, -1)]
ddn = [(-1, 0), (-1, 1), (0, 1), (1, 1), (1, 0), (1, -1), (0, -1), (-1, -1)]

def MI():
	return map(int, inp().strip().split())

def LI():
	return list(map(int, inp().strip().split()))

def LLI():
	return [list(map(int, l.split())) for l in sys.stdin.readlines().strip()]

def LI_():
	return [int(x) - 1 for x in inp().strip().split()]

def LF():
	return [float(x) for x in inp().strip().split()]

def LS():
	return inp().strip().split()

def I():
	return int(inp().strip())

def F():
	return float(inp().strip())

def S():
	return inp().strip()

def pf(s):
	return out(s + '\n')

def JA(a, sep):
	return sep.join(map(str, a))

def JAA(a, s, t):
	return s.join((t.join(map(str, b)) for b in a))

def main():
	n = I()
	arr = LI()
	ans_1 = [0] * n
	ans_2 = [0] * n
	for i in range(n):
		if i == 0:
			ans_1[i] = abs(1 - arr[i])
			ans_2[i] = abs(-1 - arr[i])
		else:
			ans_1[i] = min(abs(1 - arr[i]) + ans_1[i - 1], abs(-1 - arr[i]) + ans_2[i - 1])
			ans_2[i] = min(abs(1 - arr[i]) + ans_2[i - 1], abs(-1 - arr[i]) + ans_1[i - 1])
	pf(str(ans_1[-1]))
main()


q = int(input())
t = 0
n = 0
z = 0
a = list(map(int, input().split()))
for i in a:
	if i < 0:
		t += -1 - i
		n += 1
	elif i > 0:
		t += i - 1
	else:
		t += 1
		z += 1
if n % 2 != 0 and n % 2 - z > 0:
	t += (n % 2 - z) * 2
print(t)


n = int(input())
arr = input()
arr = arr.split()
arr2 = []
total = 0
for i in arr:
	arr2.append(int(i))
countneg = 0
for i in arr2:
	if i < 0:
		countneg += 1
		total -= 1 + i
	elif i > 0:
		total += i - 1
	else:
		total += 1
if countneg % 2 == 1:
	if 0 not in arr2:
		total += 2
print(total)


n = int(input())
s = list(map(int, input().split()))
cost = 0
cnt_neg = 0
cnt_zeros = 0
dp = [0 for _ in range(n)]
for i in range(n):
	cost += abs(abs(s[i]) - 1)
	if s[i] < 0:
		cnt_neg += 1
	if s[i] == 0:
		cnt_zeros += 1
if cnt_neg % 2 != 0 and cnt_zeros == 0:
	cost += 2
print(cost)


import math
n = int(input())
list1 = input().split()
for i in range(len(list1)):
	list1[i] = int(list1[i])
total = 0
numNeg = 0
wiggle = False
for i in range(len(list1)):
	if list1[i] >= 1:
		total += list1[i] - 1
	elif list1[i] <= -1:
		total += -1 - list1[i]
		numNeg += 1
	else:
		total += 1
		wiggle = True
if wiggle:
	print(total)
elif numNeg % 2 == 1:
	print(total + 2)
else:
	print(total)


n = int(input())
a = list(map(int, input().split()))
x = 0
y = 0
for i in range(n):
	if a[i] > 1:
		x += a[i] - 1
		a[i] = 1
	elif a[i] < -1:
		y += -1 - a[i]
		a[i] = -1
z = a.count(0)
t = a.count(-1)
u = a.count(1)
if t % 2 == 0:
	print(z + x + y)
elif z > 0:
	print(z + x + y)
elif z == 0:
	print(x + y + 2)


n = int(input())
splits = input().split(' ')
coins = 0
pos = neg = 0
zero = 0
for i in range(n):
	val = int(splits[i])
	if val < 0:
		coins += abs(val + 1)
		neg += 1
	elif val > 0:
		coins += abs(val - 1)
		pos += 1
	else:
		coins += 1
		zero += 1
if neg % 2 == 1:
	if zero == 0:
		coins += 2
print(coins)


n = int(input())
a = list(map(int, input().split()))
pos = len([x for x in a if x > 0])
neg = len([x for x in a if x < 0])
zer = n - pos - neg
ans = sum((abs(abs(x) - 1) for x in a))
if neg % 2 == 1 and zer == 0:
	ans += 2
print(ans)


def main():
	n = input()
	a = list(map(int, input().split()))
	counter = 0
	a.sort()
	i = 0
	c = 1
	while i < len(a) and a[i] < 1:
		i += 1
	a2 = a[:i]
	a1 = a[i:]
	for i in a1:
		if i > 1:
			counter += i - 1
	if len(a2) % 2 == 0:
		for i in a2:
			if i < -1:
				counter += abs(i) - 1
			if i == 0:
				counter += 1
	else:
		for i in a2[:-1]:
			if i < -1:
				counter += abs(i) - 1
			if i == 0:
				counter += 1
		if a2[-1] > 1:
			counter += a2[-1] - 1
		elif a2[-1] < 1:
			counter += abs(a2[-1]) + 1
	print(counter)
main()


q = int(input())
s = list(map(int, input().split()))
need = 0
for i in range(len(s)):
	if s[i] > 1:
		need += s[i] - 1
		s[i] = 1
	elif s[i] < -1:
		need += -1 - s[i]
		s[i] = -1
if s.count(-1) % 2 == 0:
	need += s.count(0)
elif s.count(-1) % 2 != 0 and s.count(0) != 0:
	need += s.count(0)
elif s.count(-1) % 2 != 0 and 0 not in s:
	need += s.count(0) + 2
print(need)


x = int(input())
s = list(map(int, input().split()))
p = []
nn = []
z = []
m = 0
for n in s:
	if n < 0:
		nn.append(n)
	elif n == 0:
		z.append(n)
	else:
		p.append(n)
m = sum(p) - len(p)
m += abs(sum(nn)) - len(nn)
if len(nn) % 2 == 1:
	if len(z) != 0:
		m += 1
		m += len(z) - 1
	else:
		m += 2
		m += len(z)
else:
	m += len(z)
print(m)


from sys import stdin
from sys import setrecursionlimit as SRL
SRL(10 ** 7)
rd = stdin.readline
rrd = lambda : map(int, rd().strip().split())
n = int(rd())
a = list(rrd())
is_0 = False
cntp = 0
cntn = 0
ans = 0
for i in a:
	if i > 0:
		cntp += 1
		ans += i - 1
	elif i < 0:
		cntn += 1
		ans += -1 - i
	else:
		is_0 = True
		ans += 1
if cntn % 2:
	if not is_0:
		ans += 2
print(ans)


import math
n = int(input())
arr = list(map(int, input().split()))
count = 0
res = 0
flag = 0
for a in arr:
	if a < 0:
		count += 1
	if a == 0:
		flag = 1
if flag == 0:
	count = count // 2 * 2
for a in arr:
	if a > 0:
		res += a - 1
	elif a == 0:
		res += 1
	else:
		res += 1 - a
res -= count * 2
print(res)


n = int(input())
s = [int(x) for x in input().split()]
flag = 0
ans = 0
c1 = 0
c2 = 0
for i in range(0, len(s)):
	if s[i] >= 1:
		ans = ans + abs(s[i] - 1)
		c1 += 1
	elif s[i] == 0:
		ans = ans + 1
		flag = 1
	else:
		ans = ans + abs(-1 - s[i])
		c2 += 1
if c2 % 2 != 0:
	if flag == 0:
		ans += 2
print(ans)


n = int(input())
l = list(map(int, input().split()))
new_neg = list(filter(lambda x: x < 0, l))
coin_add = 0
if len(new_neg) % 2 == 0:
	for i in l:
		if i != 0:
			x = abs(i) - 1
			coin_add += x
		else:
			coin_add += 1
elif 0 in l:
	for i in l:
		if i != 0:
			x = abs(i) - 1
			coin_add += x
		else:
			coin_add += 1
else:
	step = 1
	for i in l:
		if step == 1 and i < 0:
			if i != 0:
				x = abs(i - 1)
				coin_add += x
				step = 0
		else:
			x = abs(i) - 1
			coin_add += x
print(coin_add)


n = int(input())
arr = [int(x) for x in input().split()]
(ans, pos, neg, zero) = (0, 0, 0, 0)
for x in arr:
	if x > 0:
		ans += x - 1
		pos += 1
	elif x < 0:
		ans += -1 - x
		neg += 1
	else:
		zero += 1
if neg % 2 != 0:
	if zero != 0:
		ans += 1
		zero -= 1
	else:
		neg -= 1
		ans += 2
ans += zero
print(ans)


n = int(input())
z = 0
k = 0
x = 0
a = list(map(int, input().split()))
for i in range(len(a)):
	if a[i] > 1 or a[i] <= -1:
		z += abs(a[i]) - 1
		if a[i] < 0:
			x += 1
	elif a[i] == 0:
		k += 1
if k > 0:
	z += k
	print(z)
elif k == 0 and x % 2 == 1:
	print(z + 2)
else:
	print(z)


n = int(input())
neg = 0
coins = 0
s = input()
arr = list(map(int, s.split()))
for i in range(n):
	if arr[i] <= -1:
		coins += -1 - arr[i]
		neg += 1
	elif arr[i] >= 1:
		coins = coins + arr[i] - 1
for i in range(n):
	if arr[i] == 0:
		if neg % 2 == 0:
			coins += 1
		else:
			coins += 1
			neg += 1
if neg % 2 == 1:
	print(coins + 2)
else:
	print(coins)


n = int(input())
nn = [int(s) for s in input().split()]
dp = [[0, 0]]
mn = 0
for i in range(n):
	if nn[i] < 0:
		mn += 1
ans = 0
if mn % 2 == 0:
	for i in nn:
		ans += abs(abs(i) - 1)
elif nn.count(0):
	for i in nn:
		ans += abs(abs(i) - 1)
else:
	for i in nn:
		ans += abs(abs(i) - 1)
	ans += 2
print(ans)


n = int(input())
array = list(map(int, input().split()))
i = 0
sums = 0
zero = 0
minus = 0
plus = 0
while i < len(array):
	if array[i] > 0:
		sums += array[i] - 1
		plus += 1
	elif array[i] < 0:
		sums += abs(array[i]) - 1
		minus += 1
	else:
		zero += 1
	i += 1
sums += zero
if minus % 2 == 1:
	if zero > 0:
		print(sums)
	else:
		print(sums + 2)
else:
	print(sums)


n = int(input())
a = sorted(list(map(int, input().split())))
(p, z, m) = (0, 0, 0)
for i in a:
	if i < 0:
		p += abs(-1 - i)
		m += 1
	elif i > 0:
		p += abs(1 - i)
	else:
		p += 1
		z += 1
if m % 2 != 0:
	if z == 0:
		p += 2
print(p)


n = int(input())
a = list(map(int, input().split()))
m = 0
c1 = 10 ** 10
c2 = 0
h = 0
for i in a:
	b1 = abs(-1 - i)
	b2 = abs(1 - i)
	if i < 0:
		h += 1
		m += b1
		if b2 < c1:
			c1 = b2
			c2 = i
	else:
		m += b2
		if b1 < c1:
			c1 = b1
			c2 = i
if h % 2 == 1:
	if c2 < 0:
		m -= abs(-1 - c2) - abs(1 - c2)
	else:
		m += abs(-1 - c2) - abs(1 - c2)
print(m)


n = int(input())
a = list(map(int, input().split(' ')))
a.sort()
i = 0
count = 0
while i < n:
	if a[i] < 0:
		d = abs(a[i] + 1)
		if i == n - 1:
			count += d + 2
		elif a[i + 1] < 0:
			e = abs(a[i + 1] + 1)
			count += d + e
		elif a[i + 1] >= 0:
			e = abs(a[i + 1] + 1)
			count += d + e
		i += 2
	elif a[i] >= 0:
		e = abs(a[i] - 1)
		count += e
		i += 1
print(count)


n = int(input())
array = list(map(int, input().split()))
c = []
a = 0
g = 0
for i in array:
	if i > 1:
		c.append(i - 1)
	if i == 0:
		c.append(i + 1)
		g += 1
	if i < 0:
		c.append(abs(i) + 1)
		a += 1
b = sum(c)
d = a // 2
if a % 2 != 0 and g >= 1:
	print(b - 4 * d - 2)
else:
	print(b - 4 * d)


n = int(input())
a = sorted(list(map(int, input().split())))
product = 1
cost = 0
for i in range(n - 1):
	if a[i] <= -1:
		cost += -1 - a[i]
		product *= -1
	elif a[i] >= 1:
		cost += a[i] - 1
		product *= 1
	else:
		cost += 1
		product = 1
if a[n - 1] <= -1:
	if product == -1:
		cost += -1 - a[n - 1]
	else:
		cost += -1 - a[n - 1] + 2
elif a[n - 1] >= 1:
	if product == -1:
		cost += a[n - 1] - 1 + 2
	else:
		cost += a[n - 1] - 1
else:
	cost += 1
print(cost)


def problem():
	n = int(input())
	arr = list(map(int, input().split()))
	coins = 0
	count_minus = 0
	count_zero = 0
	for i in range(len(arr)):
		if arr[i] > 1:
			coins += arr[i] - 1
		elif arr[i] < -1:
			coins += abs(arr[i]) - 1
			count_minus += 1
		elif arr[i] == -1:
			count_minus += 1
		elif arr[i] == 0:
			count_zero += 1
	if count_minus > 0:
		if count_minus % 2 == 0:
			coins += count_zero
		elif count_zero > 0:
			coins += count_zero
		else:
			coins += 2
	else:
		coins += count_zero
	print(coins)
problem()


N = int(input())
nums = list(map(int, input().split()))
moves = 0
negative = 0
zero = False
for i in range(N):
	if nums[i] == 0:
		zero = True
	moves += min(abs(nums[i] - 1), abs(nums[i] - -1))
	if nums[i] <= -1:
		negative += 1
if negative % 2 == 1 and zero == False:
	moves += 2
print(moves)


n = int(input())
a = map(int, input().split())
(c, s, z) = (0, 1, 0)
for i in a:
	if i:
		c += abs(i) - 1
		s *= i / abs(i)
	else:
		z += 1
if s == -1 and z == 0:
	print(c + 2)
else:
	print(c + z)


a = int(input())
b = list(map(int, input().split()))
(zero, neg) = (0, 0)
count = 0
for i in b:
	if i == 0:
		zero += 1
		count += 1
	elif i <= -1:
		neg += 1
		count += abs(i) - 1
	elif i >= 1:
		count += i - 1
if zero >= neg:
	print(count)
elif neg % 2 == 0:
	print(count)
elif zero < 1:
	print(count + 2)
else:
	print(count)


n = int(input())
nums = input().split()
nums = [int(num) for num in nums]
negts = 0
zeros = 0
count = 0
for num in nums:
	if num < 0:
		count += -1 - num
		negts += 1
	elif num == 0:
		zeros += 1
		count += 1
	else:
		count += abs(num - 1)
if negts % 2 == 0:
	print(count)
elif zeros:
	print(count)
else:
	print(count + 2)


n = int(input())
a = list(map(int, input().split()))
ans = 0
nc = 0
zc = 0
for ele in a:
	if ele < 0:
		nc += 1
	if ele == 0:
		zc += 1
	if ele != 1 or ele != -1:
		ans += abs(abs(ele) - 1)
if nc % 2 and zc == 0:
	ans += 2
print(ans)


n = int(input())
data = [int(i) for i in input().split()]
val = [[], [], []]
for d in data:
	if d < 0:
		val[0].append(d)
	elif d == 0:
		val[1].append(d)
	else:
		val[2].append(d)
ans = 0
if len(val[0]) & 1:
	if len(val[1]) > 0:
		pass
	else:
		ans += 2
for d in val[0]:
	ans += -1 - d
for d in val[1]:
	ans += 1
for d in val[2]:
	ans += d - 1
print(ans)


n = int(input())
ln = [int(i) for i in input().split(' ')]
mn = 0
z = 0
c = 0
for i in ln:
	if i > 0:
		c += i - 1
	elif i < 0:
		c += -1 - i
		mn += 1
	else:
		c += 1
		z += 1
if z > 0:
	print(c)
elif mn % 2 == 0:
	print(c)
else:
	print(c + 2)


n = int(input())
l = list(map(int, input().split()))
negcount = 0
zerocount = 0
sum = 0
for x in l:
	if x >= 1:
		sum = sum + (x - 1)
	elif x <= -1:
		sum = sum + (-1 - x)
		negcount += 1
	else:
		zerocount += 1
if zerocount > 0:
	sum += zerocount
elif negcount % 2 != 0:
	sum += 2
print(sum)


def main():
	n = int(input())
	A = list(map(int, input().split()))
	assert len(A) == n
	coins = 0
	sign = 1
	sign_defined = False
	for elm in A:
		if elm > 1:
			coins += elm - 1
		elif elm <= -1:
			coins += -1 - elm
			sign = 1 - sign
		elif elm == 0:
			coins += 1
			sign_defined = True
	if sign_defined == False and sign == 0:
		coins += 2
	print(coins)
	pass
import sys
input = sys.stdin.readline
main()


no = int(input())
num = [int(i) for i in input().split()]
coins = 0
for i in range(len(num)):
	if num[i] != -1 and num[i] != 1 and (num[i] != 0):
		coins += abs(num[i]) - 1
		if num[i] < 0:
			num[i] = -1
		else:
			num[i] = 1
neg = num.count(-1)
num_0 = num.count(0)
if neg % 2 != 0:
	if num_0 != 0:
		num_0 -= 1
		coins += 1
		coins += num_0
		print(coins)
	else:
		print(coins + 2)
else:
	coins += num_0
	print(coins)


n = int(input())
l = [int(i) for i in input().split()]
cst = 0
for i in range(n):
	if l[i] < -1:
		cst += abs(l[i]) - 1
		l[i] = -1
	elif l[i] > 1:
		cst += l[i] - 1
		l[i] = 1
if l.count(-1) % 2:
	if l.count(0) > 0:
		cst += 1
		l.remove(0)
	else:
		cst += 2
cst += l.count(0)
print(cst)


n = int(input())
a = list(map(int, input().split()))
count = 0
negative = 0
zero = 0
for i in range(0, n):
	if a[i] < 0:
		count = count - (a[i] + 1)
		negative = negative + 1
	elif a[i] > 0:
		count = count + (a[i] - 1)
	else:
		count = count + 1
		zero = zero + 1
if negative % 2 != 0:
	if zero == 0:
		count = count + 2
print(count)


from math import ceil, sqrt, floor
n = int(input())
total = 0
prod = 1
zero = False
for i in map(int, input().split()):
	if i == 0:
		zero = True
	if i >= 0:
		total += abs(i - 1)
	else:
		prod = 1 - prod
		total += abs(i + 1)
if prod:
	print(total)
elif zero:
	print(total)
else:
	print(total + 2)


n = int(input())
s = str(input()).split()
l = list()
for i in s:
	l.append(int(i))
c = 0
cm1 = 0
c0 = 0
for p in l:
	if p > 1:
		c = c + (p - 1)
	if p <= -1:
		cm1 = cm1 + 1
		c = c + abs(p + 1)
	if p == 0:
		c0 = c0 + 1
if (cm1 % 2 == 0) | (cm1 == 0):
	print(c + c0)
elif c0 > 0:
	print(c + c0)
else:
	print(c + 2)


n = int(input())
arr = list(map(int, input().split(' ')))

def get_cost(n, res):
	return abs(n - res)
prev = arr[0]
mn = get_cost(prev, -1)
mx = get_cost(prev, 1)
for i in range(1, len(arr)):
	n = arr[i]
	mnn = get_cost(n, -1)
	mxn = get_cost(n, 1)
	tmn = mn
	mn = min(mn + mxn, mx + mnn)
	mx = min(tmn + mnn, mx + mxn)
print(mx)


hm = int(input())
lis = list(map(int, input().split(' ')))
numneg = 0
numzero = 0
summ = 0
for el in lis:
	if el < 0:
		numneg += 1
	elif el == 0:
		numzero += 1
		summ += 1
		continue
	el = abs(el)
	summ += el - 1
if numneg % 2 == 1:
	if 0 not in lis:
		summ += 2
print(summ)


n = int(input())
ans = 0
s = 1
z = 0
for i in input().split(' '):
	no = int(i)
	if no > 0:
		ans = no - 1 + ans
	elif no < 0:
		ans = -no - 1 + ans
		s = s * -1
	else:
		ans = ans + 1
		z = 1
if z != 1 and s == -1:
	ans = ans + 2
print(ans)


n = int(input())
l = list(map(int, input().split()))

def sgn(x):
	if x > 0:
		return 1
	else:
		return -1
s = sgn(l[0])
wynik = 0
zera = 0
for i in range(n):
	wynik += abs(l[i]) - 1 if l[i] != 0 else 1
	if l[i] == 0:
		zera = 1
if zera == 1:
	print(wynik)
else:
	mn = 1
	for i in range(n):
		mn *= sgn(l[i])
	if mn == 1:
		print(wynik)
	else:
		print(wynik + 2)


n = int(input())
l = list(map(int, input().split()))
mnc = -1
tc = 0
pc = 0
nc = 0
zeros = 0
mpc = -1
for i in range(0, len(l)):
	if l[i] < 0:
		nc = nc + 1
		tc = tc + abs(-1 - l[i])
		if mnc == -1:
			mnc = abs(-1 - l[i])
		elif abs(-1 - l[i]) < mnc:
			mnc = abs(-1 - l[i])
	if l[i] > 0:
		tc = tc + abs(1 - l[i])
		if mpc == -1:
			mpc = abs(1 - l[i])
		elif abs(1 - l[i]) < mpc:
			mpc = abs(1 - l[i])
		pc = pc + 1
	if l[i] == 0:
		zeros = zeros + 1
if nc % 2 == 0 or zeros != 0:
	tc = tc + zeros
else:
	tc = tc + 2
print(tc)


from math import *
n = int(input())
a = list(map(int, input().split(' ')))
c = 0
for i in range(n):
	if a[i] > 0:
		c += abs(a[i] - 1)
		a[i] = 1
	elif a[i] < 0:
		c += abs(a[i] + 1)
		a[i] = -1
c_1 = a.count(-1)
c_0 = a.count(0)
if c_1 & 1 and c_0 > 0:
	c += c_0
elif c_1 & 1:
	c += 2
elif c_0 > 0:
	c += c_0
print(c)


def solve():
	n = int(input())
	l = list(map(int, input().strip().split()))
	c = 0
	for i in range(n):
		x = min(abs(1 - l[i]), abs(-1 - l[i]))
		if l[i] >= 1:
			l[i] = l[i] - x
		elif l[i] <= -1:
			l[i] = l[i] + x
		c += x
	if l.count(-1) % 2 == 0:
		print(c)
	elif l.count(0) > 0:
		print(c)
	else:
		print(c + 2)
solve()


n = int(input())
l = list(map(int, input().split()))
summ = 0
odd = 0
zero = 0
for i in range(n):
	if l[i] == 0:
		summ += 1
		zero += 1
		continue
	if l[i] < 0:
		summ += abs(l[i] + 1)
		odd += 1
		continue
	if l[i] > 0:
		summ += abs(l[i] - 1)
		continue
if odd % 2 == 1 and zero == 0:
	summ += 2
print(summ)


ar = []
size1 = int(input())
for t in input().split(' '):
	ar.append(int(t))
counter = 0
neg = 0
zero = 0
for x in ar:
	if x < 0:
		counter = counter + (-1 - x)
		neg = neg + 1
	if x > 0:
		counter = counter + (x - 1)
	if x == 0:
		counter = counter + 1
		zero = zero + 1
if neg % 2 == 1:
	if zero == 0:
		counter = counter + 2
print(counter)


n = int(input())
num = [int(i) for i in input().split()]
count = ceros = negativos = 0
for i in num:
	if i > 0:
		count += abs(i - 1)
	elif i < 0:
		count += abs(i * -1 - 1)
		negativos += 1
	else:
		ceros += 1
		count += 1
if negativos % 2 == 1 and ceros == 0:
	count += 2
print(count)


NA = int(input())
S0 = list(map(int, input().split()))
fu = 0
ans = 0
flag = 0
for i in S0:
	if i > 0:
		ans += i - 1
	if i < 0:
		ans += -i - 1
		fu += 1
	if i == 0:
		flag = 1
		ans += 1
if fu & 1 and (not flag):
	ans += 2
print(ans)


from sys import stdin
n = stdin.readline()
A = (int(i) for i in stdin.readline().split())
count = 0
positive = 0
negative = 0
zero = 0
for i in A:
	if i >= 1:
		positive += 1
		count += i - 1
	elif i == 0:
		zero += 1
	elif i <= -1:
		negative += 1
		count -= i + 1
if negative % 2 == 0:
	print(count + zero)
elif negative % 2 == 1:
	if zero > 0:
		print(count + zero)
	elif zero == 0:
		print(count + 2)


_ = input()
l = list(map(int, input().split()))
c = 0
non = 0
noz = 0
for i in l:
	if i > 0:
		c += i - 1
	elif i < 0:
		c += -i - 1
		non += 1
	else:
		c += 1
		noz += 1
if non % 2 == 1 and noz == 0:
	c += 2
print(c)


n = int(input())
r = list(map(int, input().split()))
r.sort()
res = 0
zero = 0
minus = 0
for i in range(n):
	if r[i] < 0:
		res += -1 - r[i]
		minus += 1
	elif r[i] == 0:
		zero += 1
	else:
		res += r[i] - 1
if minus % 2 != 0 and zero == 0:
	res += 2
res += zero
print(res)


n = int(input())
b = [*map(int, input().split())]
neg = sum((i < 0 for i in b))
s = sum((min(abs(i - 1), abs(i + 1)) for i in b))
if neg % 2 == 1 and b.count(0) == 0:
	print(s + 2)
else:
	print(s)


n = int(input())
a = list(map(int, input().split()))
dp = [[0 for _ in range(3)] for _ in range(n)]
dp[0][0] = abs(a[0] + 1)
dp[0][2] = abs(a[0] - 1)
for i in range(n - 1):
	dp[i + 1][0] = min(dp[i][2] + abs(a[i + 1] + 1), dp[i][0] + abs(a[i + 1] - 1))
	dp[i + 1][2] = min(dp[i][2] + abs(a[i + 1] - 1), dp[i][0] + abs(a[i + 1] + 1))
print(dp[n - 1][2])


def f(A):
	minus1_cost = 0
	plus1_cost = 0
	for (i, a) in enumerate(A):
		m1_cost = abs(a + 1)
		p1_cost = abs(a - 1)
		minus1_cost_ = min(plus1_cost + m1_cost, minus1_cost + p1_cost)
		plus1_cost_ = plus1_cost + p1_cost
		if i > 0:
			plus1_cost_ = min(plus1_cost_, minus1_cost + m1_cost)
		minus1_cost = minus1_cost_
		plus1_cost = plus1_cost_
	return plus1_cost
assert f([1]) == 0
assert f([1, 1]) == 0
assert f([0]) == 1
assert f([-1]) == 2
assert f([-1, -1]) == 0
assert f([-1, 1]) == 2
assert f([0, 0, 0, 0]) == 4
assert f([-5, -3, 5, 3, 0]) == 13
n = int(input())
A = list(map(int, input().split()))
ans = f(A)
print(ans)


num_inputs = int(input())
zero = False
positive = True
moves = 0
my_list = input().split()
for i in range(num_inputs):
	num = int(my_list[i])
	if num == 0:
		moves += 1
		zero = True
		continue
	elif num < 0:
		positive = not positive
	moves += abs(num) - 1
if not (positive or zero):
	moves += 2
print(moves)


import sys
input = lambda : sys.stdin.readline().strip()
n = int(input())
ls = list(map(int, input().split()))
ls.sort(key=lambda x: abs(x))
cnt = 0
ls.reverse()
prod = 1
for i in range(len(ls) - 1):
	if abs(ls[i] - 1) >= abs(ls[i] + 1):
		prod *= -1
		cnt += abs(ls[i] + 1)
	else:
		cnt += abs(ls[i] - 1)
if prod == -1:
	cnt += abs(ls[-1] + 1)
else:
	cnt += abs(ls[-1] - 1)
print(cnt)


def f(adj):
	d = 0
	m = 0
	z = 0
	for i in adj:
		if i > 0:
			d += i - 1
		elif i < 0:
			d += -i - 1
			m += 1
		else:
			z += 1
	if z != 0:
		d += z
	elif m % 2 != 0:
		d += 2
	return d
input()
print(f([int(i) for i in input().split()]))


n = int(input())
a = list(map(int, input().split()))
ans = 0
t = 0
f = 0
for e in a:
	ans += min(abs(1 - e), abs(1 + e))
	if e < 0:
		t += 1
	elif e == 0:
		f = 1
if f == 0 and t % 2 == 1:
	ans += 2
print(ans)


n = int(input())
line = input().split()
arr = []
ans = 0
minus = 0
zeros = 0
for i in range(n):
	if int(line[i]) < 0:
		arr.append(-(int(line[i]) + 1))
		minus += 1
	elif int(line[i]) > 0:
		arr.append(int(line[i]) - 1)
	else:
		zeros += 1
if zeros > 0:
	print(sum(arr) + zeros)
elif minus % 2 == 0:
	print(sum(arr))
else:
	print(sum(arr) + 2)


I = input
n = int(I())
a = list(map(int, I().split()))
cp = 0
cn = 0
c = 0
total = 0
for i in a:
	if i > 0:
		cp += 1
		total += i - 1
	elif i < 0:
		cn += 1
		total += abs(i) - 1
	else:
		c += 1
if cn % 2 != 0:
	if c > 0:
		total += c
	else:
		total += 2
else:
	total += c
print(total)


t = int(input())
a = list(map(int, input().split()))
k = 0
s = 0
p = 0
z = 0
for i in range(t):
	if a[i] == 0:
		k = k + 1
	elif a[i] < 0:
		s = s + 1
		z = z + (abs(a[i]) - 1)
	elif a[i] > 0:
		p = a[i] - 1 + p
	if s % 2 == 0:
		v = z + p + k
	elif k > 0:
		v = z + p + k
	else:
		v = z + p + k + 2
print(v)


input()
a = list(map(int, input().split(' ')))
zeroNum = 0
cnt = 0
sign = 0
for i in a:
	if i > 0:
		cnt += i - 1
	elif i < 0:
		cnt += -1 - i
		sign += 1
	else:
		zeroNum += 1
cnt += zeroNum
if sign % 2 != 0 and zeroNum == 0:
	cnt += 2
print(cnt)


n = int(input())
A = list(map(int, input().split()))
m = 0
pos = 0
neg = 0
for i in range(n):
	if A[i] < 0:
		neg += 1
		m += -A[i] - 1
		A[i] = -1
	elif A[i] > 0:
		pos += 1
		m += A[i] - 1
		A[i] = 1
zer = n - pos - neg
if zer:
	print(m + zer)
elif neg % 2 == 0:
	print(m)
else:
	print(m + 2)


n = int(input())
arr = list(map(int, input().split()))
totalCost = 0
changeCost = 2
negVal = 0
for i in arr:
	totalCost += abs(abs(i) - 1)
	if i == 0:
		changeCost = 0
	if i < 0:
		negVal += 1
if negVal % 2 == 0:
	print(totalCost)
else:
	print(totalCost + changeCost)


n = int(input())
a = list(map(int, input().split()))
a.sort()
c = 0
r = []
f = 0
b = 0
e = 0
for i in range(len(a)):
	if a[i] >= 1:
		c = a[i] - 1
		b += c
	elif a[i] <= -1:
		c = -1 * (a[i] + 1)
		e += c
		f += 1
	elif a[i] == 0:
		r.append(0)
if f % 2 == 0:
	print(b + e + len(r))
elif len(r) >= 1:
	print(b + e + len(r))
else:
	print(b + e + 2)


n = int(input())
alist = list(map(int, input().split()))
result = 0
minus_cnt = 0
found_zero = False
for a in alist:
	if a <= -1:
		minus_cnt += 1
		result += abs(a + 1)
	elif a == 0:
		result += 1
		found_zero = True
	else:
		result += abs(a - 1)
if minus_cnt % 2 == 0:
	print(result)
elif found_zero:
	print(result)
else:
	print(result + 2)


n = int(input())
ls = list(map(int, input().split()))
ls.sort()
neg = 0
while 1:
	neg = neg + 1
	if neg >= n:
		break
	elif ls[neg] >= 0:
		break
if 0 in ls:
	flag = 1
else:
	flag = 0
if neg % 2 == 1 and flag == 1 and (neg > 0):
	c = 0
	flag2 = 1
	for i in ls:
		if i < 0:
			c = c + abs(-1 - i)
		elif i == 0 and flag2 == 1:
			flag2 = 0
			c = c + 1
		else:
			c = c + abs(i - 1)
	print(c)
elif neg % 2 == 1 and flag == 0 and (neg > 0):
	c = 0
	for i in ls:
		if i < 0 and neg > 1:
			c = c + abs(-1 - i)
			neg = neg - 1
		elif i < 0 and neg == 1:
			c = c + abs(1 - i)
		else:
			c = c + abs(i - 1)
	print(c)
elif neg % 2 == 0 and neg > 0:
	c = 0
	for i in ls:
		if i < 0:
			c = c + abs(-1 - i)
		else:
			c = c + abs(1 - i)
	print(c)
else:
	c = 0
	for i in ls:
		c = c + abs(i - 1)
	print(c)


n = int(input())
ai = list(map(int, input().split()))
ai2 = [abs(1 - abs(ai[i])) for i in range(n)]
ai3 = [int(ai[i] < 0) for i in range(n)]
ai4 = [int(ai[i] == 0) for i in range(n)]
if sum(ai4) or sum(ai3) % 2 == 0:
	print(sum(ai2))
else:
	print(sum(ai2) + 2)


n = int(input())
a = list(map(int, input().split()))
plusValue = 0
plusCount = 0
minusValue = 0
minusCount = 0
zeroCount = 0
for num in a:
	if num > 0:
		plusValue += num - 1
		plusCount += 1
	elif num < 0:
		minusValue += abs(num + 1)
		minusCount += 1
	else:
		zeroCount += 1
if minusCount % 2 == 0 or zeroCount > 0:
	print(plusValue + minusValue + zeroCount)
else:
	print(plusValue + minusValue + 2)


n = int(input())
a = list(map(int, input().split()))
c = 0
p = 0
res = 1
for i in range(n):
	if a[i] < 0:
		c += -a[i] - 1
		res *= -1
	elif a[i] > 0:
		c += a[i] - 1
	else:
		c += 1
		p += 1
if res > 0 or p > 0:
	print(c)
else:
	print(c + 2)


t = int(input())
l = list(map(int, input().split()))
(p, z) = (0, 0)
for k in l:
	if k == 0:
		z = z + 1
	if k >= 0:
		p = p + 1
n = t - p
ans = 0
for i in l:
	ans = ans + min(abs(i - 1), abs(i + 1))
if n % 2 == 0 or n == 0 or (n % 2 == 1 and z > 0):
	print(ans)
else:
	ans = ans + 2
	print(ans)


import sys
from sys import stdin, stdout
import bisect
from itertools import groupby
import math
import heapq

def modinv(n, p):
	return pow(n, p - 2, p)

def cin():
	return map(int, sin().split())

def ain():
	return list(map(int, sin().split()))

def sin():
	return input()

def inin():
	return int(input())
import math

def Divisors(n):
	l = []
	for i in range(1, int(math.sqrt(n) + 1)):
		if n % i == 0:
			if n // i == i:
				l.append(i)
			else:
				l.append(i)
				l.append(n // i)
	return l

def most_frequent(list):
	return max(set(list), key=list.count)

def main():
	n = inin()
	a = ain()
	count = 0
	product = 1
	zero = 0
	for i in range(len(a)):
		if a[i] < -1:
			count = count - 1 - a[i]
			a[i] = -1
			product = product * a[i]
		elif a[i] > 1:
			count = count + a[i] - 1
			a[i] = 1
			product = product * a[i]
		elif a[i] == 0:
			count = count + 1
			a[i] = 1
			zero = zero + 1
			product = product * a[i]
		else:
			product = product * a[i]
	if product == -1 and zero == 0:
		count = count + 2
	print(count)
py2 = round(0.5)
if py2:
	from future_builtins import ascii, filter, hex, map, oct, zip
	range = xrange
import os, sys
from io import IOBase, BytesIO
BUFSIZE = 8192

class FastIO(BytesIO):
	newlines = 0

	def __init__(self, file):
		self._file = file
		self._fd = file.fileno()
		self.writable = 'x' in file.mode or 'w' in file.mode
		self.write = super(FastIO, self).write if self.writable else None

	def _fill(self):
		s = os.read(self._fd, max(os.fstat(self._fd).st_size, BUFSIZE))
		self.seek((self.tell(), self.seek(0, 2), super(FastIO, self).write(s))[0])
		return s

	def read(self):
		while self._fill():
			pass
		return super(FastIO, self).read()

	def readline(self):
		while self.newlines == 0:
			s = self._fill()
			self.newlines = s.count(b'\n') + (not s)
		self.newlines -= 1
		return super(FastIO, self).readline()

	def flush(self):
		if self.writable:
			os.write(self._fd, self.getvalue())
			(self.truncate(0), self.seek(0))

class IOWrapper(IOBase):

	def __init__(self, file):
		self.buffer = FastIO(file)
		self.flush = self.buffer.flush
		self.writable = self.buffer.writable
		if py2:
			self.write = self.buffer.write
			self.read = self.buffer.read
			self.readline = self.buffer.readline
		else:
			self.write = lambda s: self.buffer.write(s.encode('ascii'))
			self.read = lambda : self.buffer.read().decode('ascii')
			self.readline = lambda : self.buffer.readline().decode('ascii')
(sys.stdin, sys.stdout) = (IOWrapper(sys.stdin), IOWrapper(sys.stdout))
input = lambda : sys.stdin.readline().rstrip('\r\n')
import sys

class ostream:

	def __lshift__(self, a):
		sys.stdout.write(str(a))
		return self
cout = ostream()
endl = '\n'

def readnumbers(zero=0):
	conv = ord if py2 else lambda x: x
	A = []
	numb = zero
	sign = 1
	i = 0
	s = sys.stdin.buffer.read()
	try:
		while True:
			if s[i] >= b'0'[0]:
				numb = 10 * numb + conv(s[i]) - 48
			elif s[i] == b'-'[0]:
				sign = -1
			elif s[i] != b'\r'[0]:
				A.append(sign * numb)
				numb = zero
				sign = 1
			i += 1
	except:
		pass
	if s and s[-1] >= b'0'[0]:
		A.append(sign * numb)
	return A
main()


rep = int(input())
lista = list(map(int, input().split()))
negativos = 0
zeros = 0
soma = 0
for e in lista:
	if e == 0:
		zeros += 1
		soma += 1
	elif e < 0:
		negativos += 1
		soma += abs(e + 1)
	else:
		soma += e - 1
if negativos % 2 == 1 and zeros == 0:
	soma += 2
print(soma)


from sys import stdin, stdout, setrecursionlimit
import heapq
from math import gcd, ceil, sqrt
from collections import Counter, deque
from bisect import bisect_left, bisect_right
ii1 = lambda : int(stdin.readline().strip())
is1 = lambda : stdin.readline().strip()
iia = lambda : list(map(int, stdin.readline().strip().split()))
isa = lambda : stdin.readline().strip().split()
setrecursionlimit(100000)
mod = 1000000007
n = ii1()
arr = iia()
(p, n) = (0, 2)
for a in arr:
	(x, y) = (abs(a - 1), abs(a + 1))
	(p, n) = (min(p + x, n + y), min(n + x, p + y))
print(p)


n = int(input())
ns = [int(x) for x in input().split()]
ns.sort()
result = 0
for i in range(0, n, 2):
	if i < n - 1:
		a = abs(ns[i] + 1)
		b = abs(ns[i + 1] + 1)
		c = abs(ns[i] - 1)
		d = abs(ns[i + 1] - 1)
		result += min(a + b, c + d)
	else:
		result += abs(ns[i] - 1)
print(result)


n = input()
int_list = map(int, input().split())
count = 0
zeroes = 0
negatives = 0
for num in int_list:
	if num == 0:
		zeroes += 1
	else:
		count += abs(num) - 1
	if num < 0:
		negatives += 1
if zeroes == 0 and negatives % 2 != 0:
	count += 2
else:
	count += zeroes
print(count)


from sys import stdin, stdout
n = int(stdin.readline())
lis = list(map(int, stdin.readline().split()))
cost = 0
negative = 0
for i in range(len(lis)):
	if lis[i] < 0:
		negative += 1
		cost += -1 - lis[i]
	elif lis[i] > 0:
		cost += lis[i] - 1
count_zero = lis.count(0)
if count_zero > 0:
	cost = cost + count_zero
elif negative % 2 == 1:
	cost += 2
stdout.write(str(cost) + '\n')


n = int(input())
l = list(map(int, input().split()))
c = 0
for i in range(n):
	if l[i] > 1:
		c = c + (l[i] - 1)
	elif l[i] < -1:
		c = c + (-1 - l[i])
neg = 0
z = 0
for i in range(n):
	if l[i] < 0:
		neg += 1
	if l[i] == 0:
		z += 1
if z > 0:
	c += z
elif z == 0:
	if neg % 2 != 0:
		c += 2
print(c)


n = int(input())
l = list(map(int, input().split()))
lx = l
coins = 0
zeros = 0
neg = 0
for i in range(n):
	if l[i] >= 1:
		coins += l[i] - 1
	elif l[i] == 0:
		zeros += 1
	else:
		neg = (neg + 1) % 2
		coins += (l[i] + 1) * -1
if neg == 1 and zeros == 0:
	coins += 2
else:
	coins += zeros
print(coins)


n = int(input())
l = list(map(int, input().split()))
k = 0
count = 0
t = 1
for i in l:
	if i == 0:
		count += 1
		k = 1
	elif i < 0:
		count += -1 - i
		t *= -1
	else:
		count += i - 1
		t *= 1
if t == -1:
	if k == 1:
		print(count)
	else:
		print(count + 2)
else:
	print(count)


n = int(input())
a = list(map(int, input().split()))
neg = 0
maxn = 0
maxp = 0
pos = 0
zero = 0
b = []
a.sort()
for i in a:
	if i < 0:
		neg += 1
		maxn += abs(i)
		b.append(i)
	elif i > 0:
		pos += 1
		maxp += i
	else:
		zero += 1
x = 0
y = 0
if pos > 0:
	y = maxp - pos
if neg >= 2 and neg % 2 == 0:
	x = maxn - neg
elif neg >= 1 and neg % 2 != 0:
	if zero > 0:
		x = maxn - neg + 1
		zero -= 1
	else:
		x = maxn - neg + 2
elif neg == 1 and neg % 2 != 0:
	x = maxn - 1
print(x + y + zero)


n = int(input())
s = input()
a = s.split()
for i in range(len(a)):
	a[i] = int(a[i])
j = int(0)
ans = int(0)
z = int(0)
cnt = int(0)
while j < n:
	if a[j] > 0:
		k = abs(a[j] - 1)
		ans += k
	if a[j] == 0:
		ans += 1
		z = int(1)
	if a[j] < 0:
		ans += abs(a[j] + 1)
		cnt += 1
	j += 1
if z == 1:
	print(ans)
elif cnt % 2 == 0:
	print(ans)
else:
	print(ans + 2)


from sys import stdin
inp = stdin.readlines()
number_list = [int(i) for i in inp[-1].split()]
new_list = []
s = 0
for i in number_list:
	if i >= 0:
		s += abs(abs(i) - 1)
		new_list.append(1)
	else:
		s += abs(i + 1)
		new_list.append(-1)
if new_list.count(-1) % 2:
	if not 0 in number_list:
		s += 2
print(s)


n = int(input())
a = list(map(int, input().split()))
mines = 0
pos = 0
res = 0
zero = 0
for i in range(n):
	if a[i] > 0:
		res += a[i] - 1
		pos += 1
	elif a[i] < 0:
		res += abs(a[i]) - 1
		mines += 1
	else:
		zero += 1
		res += 1
if mines % 2 != 0:
	if zero > 0:
		pass
	else:
		res += 2
print(res)


def toint(l):
	for i in range(len(l)):
		l[i] = int(l[i])
	return l
n = int(input())
a = input()
a = a.split()
a = toint(a)
n_zeros = 0
cost = 0
for i in range(len(a)):
	if a[i] < -1:
		cost -= a[i] + 1
		a[i] = -1
	elif a[i] > 1:
		cost += a[i] - 1
		a[i] = 1
	elif a[i] == 0:
		n_zeros += 1
		cost += 1
		a[i] = 1
mul = 1
for i in range(n):
	mul *= a[i]
if mul != 1:
	if n_zeros == 0:
		cost += 2
print(cost)


n = int(input())
ev = True
zr = False
res = 0
for v in map(int, input().split()):
	if v < 0:
		res += -v - 1
		ev = not ev
	elif v > 0:
		res += v - 1
	else:
		zr = True
		res += 1
if not zr and (not ev):
	res += 2
print(res)


class One:
	n = int(input())
	a = list(map(int, input().split()))
	listmin = list()
	cero = False
	counter = 0
	for i in range(n):
		if a[i] < 0:
			listmin.append(a[i])
		elif a[i] == 0:
			cero += 1
		if a[i] != 1 and a[i] != 0:
			counter += abs(a[i]) - 1
	if len(listmin) % 2 != 0 and cero == 0:
		counter += 2
	print(counter + cero)


from collections import deque
from collections import Counter
from itertools import permutations
import heapq

def counterExample():
	arr = [1, 3, 4, 1, 2, 1, 1, 3, 4, 3, 5, 1, 2, 5, 3, 4, 5]
	counter = Counter(arr)
	top_three = counter.most_common(3)
	print(top_three)
q = deque()
import math

def main():
	n = int(input())
	numbers = [int(i) for i in input().split()]
	sign = 1
	count = 0
	numberZero = 0
	for number in numbers:
		if number > 1:
			count += number - 1
		if number < -1:
			count += abs(number + 1)
			sign *= -1
		if number == -1:
			sign *= -1
		if number == 0:
			numberZero += 1
	if numberZero >= 1:
		return count + numberZero
	if numberZero == 0:
		if sign == 1:
			return count
		else:
			return count + 2
print(main())


n = int(input())
ls = list(map(int, input().split()))
ans = 0
p = 0
m = 0
m1 = 0
z = 0
for i in range(len(ls)):
	if ls[i] > 1:
		ans = ans + ls[i] - 1
		p = p + 1
	elif ls[i] == -1:
		m1 = m1 + 1
	elif ls[i] < -1:
		ans = ans + abs(ls[i] + 1)
		m = m + 1
	elif ls[i] == 0:
		z = z + 1
if (m + m1) % 2 == 0 or z > 0:
	print(ans + z)
else:
	print(ans + z + 2)


n = int(input())
arr = [int(i) for i in input().split()]
c = 0
neg = 0
zero = 0
for i in arr:
	if i < 0:
		c += abs(i) - 1
		neg += 1
	elif i == 0:
		zero += 1
		c += 1
	else:
		c += i - 1
if neg % 2:
	if not zero:
		c += 2
print(c)


n = int(input())
a = [int(x) for x in input().split()]
z = a.count(0)
v = 1
counter = 0
for x in a:
	if x < 0:
		counter += -1 - x
		v *= -1
	elif x > 0:
		counter += x - 1
if z > 0:
	counter += z
elif v == -1:
	counter += 2
print(counter)


import math
n = int(input())
a = list(map(int, input().split()))
k = 0
zero = False
for i in range(n):
	if a[i] != 1 or a[i] != -1:
		if a[i] == 0:
			zero = True
			k += 1
			a[i] = 1
		else:
			if a[i] > 1:
				k += math.fabs(a[i]) - 1
				a[i] = 1
			if a[i] < 1:
				k += math.fabs(a[i]) - 1
				a[i] = -1
prod = 1
for i in range(n):
	prod *= a[i]
if prod == 1:
	print(int(k))
	exit(0)
if prod == -1:
	if zero:
		print(int(k))
	else:
		k += 2
		print(int(k))
		exit(0)


x = int(input())
l = list(map(int, input().split()))
l.sort()
neg = 0
pos = 0
n = 0
z = 0
p = 0
for i in range(x):
	if l[i] < 0:
		neg += l[i]
		n += 1
	elif l[i] > 0:
		pos += l[i]
		p += 1
	else:
		z += 1
if n % 2 != 0:
	if z != 0:
		print(abs(neg + 1 * n) + z + (pos - 1 * p))
	else:
		print(abs(neg + 1 * n) + (pos - 1 * p) + 2)
else:
	print(abs(neg + 1 * n) + z + (pos - 1 * p))


n = int(input())
a = list(map(int, input().split()))
cnt = 0
lt = 0
gt = 0
zero = 0
for i in range(n):
	if a[i] < 0:
		cnt += a[i] * -1 - 1
		lt += 1
	elif a[i] > 0:
		cnt += a[i] - 1
		gt += 1
	else:
		cnt += 1
		zero += 1
if lt == 0:
	print(cnt)
elif lt % 2 == 0:
	print(cnt)
elif zero > 0:
	print(cnt)
else:
	print(cnt + 2)


n = int(input())
a = [int(x) for x in input().split()]
count0 = 0
countnegative = 0
countn = 0
countp = 0
countpositive = 0
for i in range(len(a)):
	if a[i] == 0:
		count0 += 1
	elif a[i] < 0:
		countnegative += 1
		countn += abs(a[i]) - 1
	else:
		countpositive += 1
		countp += a[i] - 1
total = countp + countn
if count0 > 0:
	total += count0
elif countnegative % 2 == 1:
	total += 2
print(total)


n = int(input())
luis = 32
a = list(map(int, input().split()))
num_neg = 0
num_neg = sum((1 for i in a if i < 0))
count = 0
zeros = a.count(0)
if num_neg % 2 != 0 and zeros == 0:
	count = 2
for i in range(n):
	if a[i] < 0:
		count = count + abs(1 + a[i])
	if a[i] > 0:
		count = count + abs(1 - a[i])
	if a[i] == 0:
		count = count + 1
print(count)


def main(a):
	index = 0
	ans = 0
	x = False
	if 0 in a:
		x = True
	while index < len(a):
		if a[index] == 0:
			ans = ans + 1
			a[index] = 1
		elif a[index] < 1:
			if a[index] != -1:
				ans = ans + -1 - a[index]
				a[index] = -1
		elif a[index] > 1:
			ans = ans + a[index] - 1
			a[index] = 1
		index = index + 1
	i = product(a)
	if i == -1 and x is False:
		ans = ans + 2
	return ans

def product(arr):
	pro = arr[0]
	index = 1
	while index < len(arr):
		pro = pro * arr[index]
		index = index + 1
	return pro
n = int(input())
a1 = list(map(int, input().rstrip().split()))
res = main(a1)
print(res)


n = int(input())
a = input().split()
k0 = km1 = k1 = ans = 0
for x in a:
	x = int(x)
	if x <= -1:
		ans += -1 - x
		km1 += 1
	elif x == 0:
		k0 += 1
	elif x >= 1:
		ans += x - 1
		k1 += 1
if km1 % 2 == 1:
	if k0 > 0:
		k0 -= 1
		km1 += 1
		ans += 1
	else:
		km1 -= 1
		k1 += 1
		ans += 2
ans += k0
print(ans)


import math
n = int(input())
arr = list(map(int, input().split()))
co = 0
cmo = 0
cz = 0
ans = 0
for i in range(n):
	neg = abs(-1 - arr[i])
	pos = abs(1 - arr[i])
	if arr[i] == 0:
		cz += 1
		continue
	if neg < pos:
		cmo += 1
		ans += neg
	else:
		co += 1
		ans += pos
if cmo % 2 == 0:
	ans += cz
elif cz == 0:
	ans += 2
else:
	ans += cz
print(ans)


def mult(l):
	res = l[0]
	for i in range(1, n):
		res *= l[i]
	return res
n = int(input())
a = list(map(int, input().split()))
ans = 0
k = 0
for i in range(n):
	if a[i] > 1:
		ans += a[i] - 1
		a[i] = 1
	elif a[i] < -1:
		ans += -1 - a[i]
		a[i] = -1
	elif a[i] == 0:
		k += 1
if k > 0:
	ans += k
elif mult(a) != 1:
	ans += 2
print(ans)


n = int(input())
a = [int(x) for x in input().split()]
ne = 0
po = 0
an = 0
ze = 0
for j in a:
	if j < 0:
		an += abs(j + 1)
		ne += 1
	elif j > 0:
		an += abs(j - 1)
		po += 1
	else:
		ze += 1
if ne % 2 == 0:
	print(an + ze)
elif ze != 0:
	print(an + ze)
else:
	print(an + 2)


def make(t, a):
	r = 0
	neg = 0
	zero = 0
	for i in range(t):
		if a[i] != 0:
			r += abs(a[i]) - 1
			if a[i] < 0:
				neg += 1
		else:
			zero += 1
			r += 1
	if neg != 0 and (neg % 2 != 0 or neg == 1) and (zero == 0):
		r += 2
	print(r)

def main():
	try:
		t = int(input())
		a = [int(x) for x in input().split(' ')]
		make(t, a)
		main()
	except:
		print()
main()


n = int(input())
a = list(map(int, input().split()))
res = 0
neg = 0
z = 0
for i in a:
	if i < 0:
		res += -1 - i
		neg += 1
	elif i > 0:
		res += i - 1
	else:
		res += 1
		z += 1
if neg % 2 == 1 and z == 0:
	res += 2
print(res)


n = int(input())
x = list(map(int, input().split()))
count_positive = 0
count_negative = 0
count_zero = 0
total_sum = 0
flag = 0
x.sort()
for number in x:
	if number < 0:
		count_negative += 1
	elif number == 0:
		count_zero += 1
	elif number > 0:
		count_positive += 1
for i in range(n):
	if x[i] < 0:
		if count_negative % 2 == 0:
			total_sum += abs(x[i] + 1)
		elif i == n - 1 or x[i + 1] > 0:
			total_sum += abs(x[i]) + 1
		elif x[i + 1] == 0:
			flag = 1
			total_sum += abs(x[i])
		elif i != n - 1 and x[i + 1] < 0:
			total_sum += abs(x[i]) - 1
	elif x[i] == 0:
		if flag == 1:
			flag = 2
			continue
		elif flag != 1:
			total_sum += 1
	else:
		total_sum += x[i] - 1
print(total_sum)


n = int(input())
l = list(map(int, input().split()))
L = []
zero = 0
zf = 0
odd = 0
pi = 0
l.sort()
for i in range(len(l)):
	if l[i] < 0:
		L.append(abs(l[i] + 1))
		odd += 1
	elif l[i] == 0:
		zero = i
		zf = 1
		L.append(1)
	else:
		pi = i
		L.append(abs(l[i] - 1))
if zf == 0 and odd % 2 != 0:
	L[pi - 1] += 2
print(sum(L))


a = int(input())
b = list(map(int, input().split()))
b.sort()
count = 0
l1 = []
for i in range(a):
	if b[i] <= 0:
		count += 1
if count % 2 == 0:
	for j in range(count):
		l1.append(abs(-1 - b[j]))
	for k in range(a - count):
		l1.append(abs(1 - b[k + count]))
	print(sum(l1))
else:
	for j in range(count - 1):
		l1.append(abs(-1 - b[j]))
	for k in range(a - count + 1):
		l1.append(abs(1 - b[k + count - 1]))
	print(sum(l1))


n = int(input())
ns = list(map(int, input().split()))
counter = 0
ccz = ns.count(0)
for i in range(n):
	while ns[i] != 1 and ns[i] != -1:
		if ns[i] > 0:
			counter += ns[i] - 1
			ns[i] -= ns[i] - 1
		elif ns[i] == 0:
			ns[i] -= 1
			counter += 1
		else:
			counter -= ns[i] + 1
			ns[i] += -ns[i] - 1
cc = ns.count(-1)
if cc % 2 == 0:
	print(counter)
elif ccz > 0:
	print(counter)
else:
	print(counter + 2)


import sys
from collections import defaultdict as dd
from itertools import permutations as pp
from itertools import combinations as cc
from collections import Counter as ccd
from random import randint as rd
from bisect import bisect_left as bl
from heapq import heappush as hpush
from heapq import heappop as hpop
mod = 10 ** 9 + 7

def ri(flag=0):
	if flag == 0:
		return [int(i) for i in sys.stdin.readline().split()]
	else:
		return int(sys.stdin.readline())
n = ri(1)
a = ri()
temp1 = []
temp2 = []
zero = 0
for i in a:
	if i > 0:
		temp1.append(abs(i - 1))
	elif i < 0:
		temp2.append(abs(i + 1))
	else:
		zero += 1
check = 0
if len(temp2) % 2 == 1:
	if zero > 0:
		check = 1
		zero -= 1
	elif zero <= 0:
		check = 2
print(sum(temp1) + sum(temp2) + check + zero)


n = int(input())
l = list(map(int, input().split()))
ans = 0
(p, o, z) = (0, 0, 0)
for i in l:
	if i == 0:
		z += 1
	elif i >= 0:
		ans += abs(i - 1)
		p += 1
	else:
		ans += -1 - i
		o += 1
if o % 2 == 0:
	print(ans + z)
elif z == 0:
	print(ans + 2)
else:
	print(ans + z)


def solution():
	n = int(input())
	a = map(int, input().split())
	ans = 0
	res = 1
	is_zero = False
	for x in a:
		if x >= 1:
			ans += x - 1
		elif x <= -1:
			ans -= x + 1
			res *= -1
		else:
			ans += 1
			is_zero = True
	if res == -1 and (not is_zero):
		ans += 2
	print(ans)
solution()


n = int(input())
l = list(map(int, input().split()))
c = 0
for i in l:
	if i <= 0:
		c += 1
if c % 2 == 0:
	ans = 0
	for i in l:
		if i <= 0:
			ans += abs(i + 1)
		else:
			ans += i - 1
else:
	ans = 0
	if 0 in l:
		for i in l:
			if i <= 0:
				ans += abs(i + 1)
			else:
				ans += i - 1
	else:
		po = 0
		ne = 0
		posum = 0
		nesum = 0
		for i in l:
			if i < 0 and i != -1:
				ne += 1
				nesum += i
			elif i > 0 and i != 1:
				po += 1
				posum += i
		ans += posum - po
		ans += abs(nesum + ne) + 2
print(ans)


n = int(input())
a = list(map(int, input().split()))
zero = False
for i in range(n):
	if a[i] == 0:
		zero = True
ans = 0
if zero:
	for i in range(n):
		if a[i] < 0:
			ans += -1 - a[i]
		elif a[i] > 0:
			ans += a[i] - 1
		else:
			ans += 1
else:
	neg = 0
	pos = 0
	neg1 = []
	pos1 = []
	for i in range(n):
		if a[i] < 0:
			neg += 1
			neg1.append(a[i])
		else:
			pos += 1
			pos1.append(a[i])
	for i in range(neg):
		ans += -1 - neg1[i]
	for i in range(pos):
		ans += pos1[i] - 1
	if neg % 2 != 0:
		ans += 2
print(ans)


n = int(input())
list = input().split()
minus = 0
sum = 0
zero = 0
for i in list:
	if int(i) < 0:
		sum = sum - (1 + int(i))
		minus = minus + 1
	if int(i) > 0:
		sum = sum + (int(i) - 1)
	if int(i) == 0:
		sum = sum + 1
		zero = zero + 1
if minus % 2 == 0 or zero > 0:
	print(sum)
else:
	print(sum + 2)


n = int(input())
a = list(map(int, input().split()))
x = [0] * a.count(0)
y = []
z = []
for i in a:
	if i < 0:
		z.append(i)
	elif i > 0:
		y.append(i)
m = len(x)
for i in y:
	m += i - 1
if len(z) % 2 == 0:
	for i in z:
		m += abs(i + 1)
elif len(x) > 0:
	for i in range(len(z)):
		m += abs(z[i] + 1)
else:
	z.sort()
	m += 1 - z[0]
	for i in range(1, len(z)):
		m += abs(z[i] + 1)
print(m)


t = int(input())
a = []
coin = 0
a = [int(x) for x in input().split()]
a.sort()
greaterthan = [i for i in a if i > 0]
greaterthannew = []
lessthan = [i for i in a if i < 0]
lessthannew = []
zero = [i for i in a if i == 0]
for j in greaterthan:
	coindum = j - 1
	greaterthannew.append(1)
	coin = coin + coindum
for j in lessthan:
	coindum = -(j + 1)
	lessthannew.append(-1)
	coin = coin + coindum
pro = 1
for j in lessthannew:
	pro = pro * j
if pro == -1:
	if len(zero) > 0:
		coin = coin + 1
		coin = len(zero) - 1 + coin
	else:
		coin = coin + 2
else:
	coin = coin + len(zero)
print(coin)


n = int(input())
l = input().split(' ')
coin = 0
n = 0
zero = False
for i in range(len(l)):
	if type(l[i]) != int:
		l[i] = int(l[i])
	if l[i] > 1:
		coin += l[i] - 1
		l[i] = 1
	elif l[i] <= -1:
		coin += -l[i] - 1
		l[i] = -1
		n += 1
	elif l[i] == 0:
		coin += 1
		l[i] = 1
		zero = True
if all([True if l[i] == 1 or l[i] == -1 else False for i in range(len(l))]):
	if n % 2 != 0:
		if zero:
			print(coin)
		else:
			coin += 2
			print(coin)
	else:
		print(coin)


n = int(input())
array = list(map(int, input().split()))
if n == 1:
	print(abs(1 - array[0]))
	exit(0)
dp1 = [0] * n
dp2 = [0] * n
for i in range(n):
	if i == 0:
		dp1[i] = abs(-1 - array[i])
		dp2[i] = abs(1 - array[i])
	else:
		n1 = abs(-1 - array[i])
		n2 = abs(1 - array[i])
		dp1[i] = min(n1 + dp2[i - 1], n2 + dp1[i - 1])
		dp2[i] = min(n1 + dp1[i - 1], n2 + dp2[i - 1])
print(dp2[n - 1])


n = int(input())
l = list(map(int, input().split()))
p = 0
c = 0
for i in range(n):
	if l[i] <= -1:
		p += 1
	elif l[i] == 0:
		c += 1
count = 0
if p % 2 == 0:
	for i in range(n):
		if l[i] <= -1:
			count += abs(-1 - l[i])
if p % 2 == 1:
	for i in range(n):
		if l[i] <= -1:
			count += abs(-1 - l[i])
if c == 0 and p % 2 == 1:
	count += 2
if c > 0:
	for i in range(n):
		if l[i] == 0:
			count += 1
d = 0
for i in range(n):
	if l[i] > 0:
		count += abs(1 - l[i])
		d += abs(1 - l[i])
print(count)


n = int(input())
a = list(map(int, input().split()))
m1 = []
m = []
for i in a:
	m1.append(abs(-1 - i))
	m.append(abs(1 - i))
k = [int(m1[i] < m[i]) for i in range(len(a))]
x = sum([min(m1[i], m[i]) for i in range(len(a))])
if k.count(1) % 2 == 1 and 0 not in a:
	x += 2
print(x)


n = int(input())
l = list(map(int, input().split()))
cnt = 0
o = 0
ans = 0
for i in l:
	if i < 0:
		cnt += 1
		ans += 1 - i
	elif i == 0:
		ans += 1
		o += 1
	else:
		ans += i - 1
if cnt % 2:
	cnt -= 1
	if o > 0:
		cnt += 1
ans -= cnt * 2
print(ans)


(n, c, b) = (input(), 0, 0)
for x in map(int, input().split()):
	if x < 0:
		c += x * -1 - 1
		b += 1
	elif x > 0:
		c += x - 1
	else:
		c += 1
		n = 0
print(c if b % 2 == 0 or n == 0 else c + 2)


import math

class Input:

	def readInt(self):
		return int(input())

	def readIntArray(self):
		return [int(x) for x in input().split(' ')]

	def readString(self):
		return input()

	def readStringArray(self):
		return input().split(' ')

	def readFloat(self):
		return float(input())

	def readFloatArray(self):
		return [float(x) for x in input().split(' ')]

def main():
	inp = Input()
	n = inp.readInt()
	arr = inp.readIntArray()
	zero = []
	pos = []
	neg = []
	for i in range(n):
		if arr[i] == 0:
			zero.append(arr[i])
		elif arr[i] > 0:
			pos.append(arr[i])
		else:
			neg.append(arr[i])
	ans = 0
	if len(zero) > 0:
		for i in range(len(neg)):
			ans += -1 - neg[i]
		ans += len(zero)
		for i in range(len(pos)):
			ans += pos[i] - 1
	else:
		for i in range(len(neg)):
			ans += -1 - neg[i]
		for i in range(len(pos)):
			ans += pos[i] - 1
		if len(neg) % 2 != 0:
			ans += 2
	print(ans)
main()


n = int(input())
A = list(map(int, input().split()))

def func(A):
	summ = 0
	one = 0
	zero = 0
	for i in range(len(A)):
		if A[i] < 0:
			summ += -1 - A[i]
			one += 1
		elif A[i] > 0:
			summ += A[i] - 1
		else:
			summ += 1
			zero += 1
	if one % 2 == 1 and (not zero > 0):
		summ += 2
	return summ
print(func(A))


q = int(input())
l = list(map(int, input().split()))
steps = sum((abs(abs(x) - 1) for x in l))
minuses = sum((1 for x in l if x < 0))
zeroes = any((x == 0 for x in l))
if minuses % 2 == 1 and (not zeroes):
	steps += 2
print(steps)


n = int(input())
lis = [int(x) for x in input().split()]
minSwitch = 100000000
total_cost = 0
current_sign = 1
for i in lis:
	cost1 = abs(i - 1)
	cost2 = abs(i + 1)
	if cost1 < cost2:
		total_cost += cost1
		if cost2 - cost1 < minSwitch:
			minSwitch = cost2 - cost1
	else:
		total_cost += cost2
		if cost1 - cost2 < minSwitch:
			minSwitch = cost1 - cost2
		current_sign = 1 if current_sign == 0 else 0
if current_sign == 0:
	total_cost += minSwitch
print(total_cost)


n = int(input())
l = list(map(int, input().split()))[:n]
a = 0
c = 0
for i in l:
	if i == 0:
		c = c + 1
	elif i > 0:
		c = c + (i - 1)
	elif i < 0:
		a = a + 1
if a % 2 == 0:
	for i in l:
		if i < 0:
			c = c + abs(i + 1)
	print(c)
elif 0 not in l:
	for i in l:
		if i < 0:
			c = c + abs(i + 1)
	print(c + 2)
else:
	for i in l:
		if i < 0:
			c = c + abs(i + 1)
	print(c)


n = int(input())
arr = list(map(int, input().split(' ')))
cost = [0 for i in range(n)]
maxi = -float('inf')
maxi2 = float('inf')
id2 = -1
negs = 0
id = -1
for (idx, i) in enumerate(arr):
	if i < 0:
		cost[idx] = abs(i - -1)
		if i > maxi:
			maxi = i
			id = idx
		negs += 1
	elif i > 0:
		cost[idx] = abs(i - 1)
		if i < maxi2:
			maxi2 = i
			id2 = idx
	elif i == 0:
		maxi = 0
		id = idx
		cost[idx] = 1
if negs % 2 == 1:
	if id2 != -1:
		if abs(arr[id] - 1) < abs(arr[id2] - -1):
			cost[id] = abs(arr[id] - 1)
		else:
			cost[id2] = abs(arr[id2] - -1)
	else:
		cost[id] = abs(arr[id] - 1)
print(sum(cost))


n = int(input())
a = list(map(int, input().split()))
ans = 0
cnt = 0
cnt2 = 0
for i in range(n):
	if a[i] < 0:
		ans += abs(a[i]) - 1
		a[i] = -1
		cnt2 += 1
	elif a[i] == 0:
		cnt += 1
	else:
		ans += a[i] - 1
		a[i] = 1
if cnt2 % 2 == 1 and cnt == 0:
	ans += 2
	print(ans)
else:
	ans += cnt
	print(ans)


n = int(input())
arr = list(map(int, input().split()))
(less_1, zero) = (0, 0)
count = 0
for a in arr:
	if a < 0:
		less_1 += 1
		count += abs(a + 1)
	elif a == 0:
		zero += 1
	else:
		count += a - 1
count += zero
if zero == 0 and less_1 % 2 != 0:
	count += 2
print(count)


n = int(input())
a = list(map(int, input().split()))
new_list = []
operation_count = 0
count_zero = 0
for i in range(0, n, +1):
	if a[i] < -1:
		new_list.append(a[i] - (a[i] + 1))
		operation_count = operation_count - a[i] - 1
	elif a[i] > 1:
		new_list.append(a[i] - (a[i] - 1))
		operation_count = operation_count + a[i] - 1
	elif a[i] == -1 or a[i] == 1:
		new_list.append(a[i])
	elif a[i] == 0:
		count_zero += 1
find_multiplication = 1
for i in range(0, len(new_list), +1):
	find_multiplication = find_multiplication * new_list[i]
if find_multiplication == 1:
	operation_count += count_zero
	print(operation_count)
elif find_multiplication == -1:
	if count_zero > 0:
		operation_count += count_zero
		print(operation_count)
	else:
		operation_count += 2
		print(operation_count)


n = int(input())
l = [int(x) for x in input().split()]
a = []
k = 0
(po, ne) = (0, 0)
for i in range(n):
	if l[i] > 0:
		a += [l[i] - 1]
		po += 1
	elif l[i] < 0:
		a += [-1 - l[i]]
		ne += 1
	else:
		k += 1
a += [k]
if ne % 2 == 1 and k == 0:
	a += [2]
print(sum(a))


x = int(input())
l = input()
negati = l.count('-')
l = list(map(int, l.split()))
zero = l.count(0)
pos = len(l) - zero - negati
s = 0
for i in range(len(l)):
	if l[i] > 0:
		s += l[i] - 1
		l[i] = 1
	elif l[i] < 0:
		s += abs(l[i]) - 1
		l[i] = -1
if negati % 2 != 0 and zero == 0:
	s += 2
s += zero
print(s)


x = int(input())
a = list(map(int, input().split()))
s = 0
b = 0
p = []
q = 0
r = []
for i in range(x):
	if a[i] > 0:
		r.append(a[i])
	elif a[i] == 0:
		q += 1
	else:
		p.append(a[i])
b += -sum(p) - len(p)
b += sum(r) - len(r)
b += q
if len(p) % 2 == 1:
	if q == 0:
		b += 2
print(b)


t = int(input())
a = list(map(int, input().strip().split(' ')))
x = 0
y = 0
c1 = 0
c2 = 0
c3 = 0
for i in a:
	if i < 0:
		x += abs(i + 1)
		c1 += 1
	elif i > 0:
		y += i - 1
		c2 += 1
	else:
		y += 1
		c3 += 1
if c3 > 0:
	print(x + y)
elif c1 % 2 != 0:
	print(x + y + 2)
else:
	print(x + y)


from sys import setcheckinterval, stdin
setcheckinterval(1000)

def iin():
	return int(stdin.readline())

def lin():
	return list(map(int, stdin.readline().split()))
n = iin()
a = lin()
a.sort()
ch = 0
for i in range(n):
	if a[i] > 0:
		break
	else:
		ch += 1
if ch % 2 != 0:
	ch -= 1
sol = 0
for i in range(ch):
	sol += abs(-1 - a[i])
for i in range(ch, n):
	sol += abs(a[i] - 1)
print(sol)


import math, sys
from collections import Counter, defaultdict
from sys import stdin, stdout
input = stdin.readline
lili = lambda : list(map(int, sys.stdin.readlines()))
li = lambda : list(map(int, input().split()))
n = int(input())
a = li()
s = c = 0
p = 1
for i in range(0, n):
	if a[i] != 0:
		c = c + (abs(a[i]) - 1)
		if a[i] > 0:
			a[i] = 1
		else:
			a[i] = -1
	else:
		a[i] = 1
		c = c + 1
		s = s + 1
	p = p * a[i]
if p == 1:
	print(c)
elif s > 0:
	print(c)
else:
	print(c + 2)


n = int(input())
cn = [int(x) for x in input().split()]
zc = []
nc = []
pc = []
for i in cn:
	if i > 0:
		pc.append(i)
	elif i < 0:
		nc.append(i)
	else:
		zc.append(i)
cost_c = 0
for i in pc:
	cost_c += i - 1
for i in nc:
	cost_c += -1 - i
if zc:
	cost_c += len(zc)
elif len(nc) % 2 == 1:
	cost_c += 2
print(cost_c)


n = int(input())
inp = [int(x) for x in input().split()]
ans = 0
parity = 1
zeroes = False
for i in range(n):
	temp = inp[i]
	if temp == 0:
		zeroes = True
		ans += 1
	else:
		ans += abs(temp) - 1
		if temp < 0:
			parity *= -1
if not zeroes:
	if parity == -1:
		ans += 2
print(ans)


input()
nums = list(map(int, input().split()))
nonPositive = [i for i in nums if i <= 0]
if len(nonPositive) % 2 == 0 or max(nonPositive) == 0:
	print(sum([i - 1 for i in nums if i > 0]) + sum([abs(i + 1) for i in nonPositive]))
else:
	print(sum([i - 1 for i in nums if i > 0]) + sum([abs(i + 1) for i in nonPositive]) + 2)


n = int(input())
s = list(map(int, input().split()))
ans = 0
o = 0
f = 0
for i in s:
	if i == 0:
		f += 1
	else:
		if i < 0:
			o += 1
		ans += abs(i) - 1
if o % 2 == 0 and (not f):
	print(ans)
elif f:
	print(ans + f)
else:
	print(ans + 2)


N = int(input())
s = map(int, input().split())
num = 0
Neg = 0
Zeros = 0
for c in s:
	if c > 0:
		num += c - 1
	elif c < 0:
		num += -c - 1
		Neg += 1
	else:
		Zeros += 1
if Zeros > 0:
	print(num + Zeros)
elif Neg % 2 != 0:
	print(num + 2)
else:
	print(num)


n = int(input())
x = list(map(int, input().split()))
coin = 0
count = 0
product = 1
for a in x:
	if a <= -1:
		product *= -1
		coin += -1 - a
	elif a >= 1:
		coin += a - 1
	else:
		count += 1
if count > 0:
	coin += count
elif product == -1:
	coin += 2
print(coin)


a = int(input())
b = list(map(int, input().split()))
e = []
f = []
c = 0
for x in range(a):
	if b[x] > 0:
		d = b[x] - 1
		c = c + d
	elif b[x] == 0:
		d = b[x] + 1
		c = c + abs(d)
		e.append(-1)
		f.append(-1)
	else:
		d = b[x] + 1
		c = c + abs(d)
		e.append(-1)
if len(e) % 2 == 0:
	print(c)
elif len(f) == 0:
	print(c + 2)
else:
	print(c)


import math
n = int(input())
a = list(map(int, input().split(' ')))
neg_count = 0
pos_count = 0
zero_count = 0
delta = []
for i in a:
	if i > 0:
		pos_count += 1
	elif i == 0:
		zero_count += 1
	else:
		neg_count += 1
	delta.append(abs(abs(i) - 1))
s = 0
for i in delta:
	s += i
if neg_count % 2:
	if zero_count > 0:
		print(s)
	else:
		print(s + 2)
else:
	print(s)


import sys
from math import sqrt, floor, factorial
from collections import deque, Counter
inp = sys.stdin.readline
read = lambda : list(map(int, inp().strip().split()))

def solve():
	n = int(inp())
	arr = read()
	c = 1
	s = 0
	zero = 0
	for i in arr:
		if i == 0:
			s += 1
			zero += 1
		elif i <= -1:
			c *= -1
			s += abs(-1 - i)
		else:
			c *= 1
			s += abs(1 - i)
	if not zero and c < 1:
		s += 2
	print(s)
solve()


n = int(input())
a = [int(s) for s in input().split()]
neg = 0
z = False
coins = 0
for x in a:
	if x > 0:
		coins += x - 1
	elif x < 0:
		neg += 1
		coins += -(x + 1)
	else:
		coins += 1
		z = True
if neg % 2 == 1:
	if not z:
		coins += 2
print(coins)


n = int(input())
nos = [int(k) for k in input().split(' ')]
sign = 1
mm2 = False
coins = 0
for k in nos:
	if k > 1:
		coins += k - 1
	elif k == 0:
		coins += 1
		mm2 = True
	elif k < 1:
		coins += -k - 1
		sign *= -1
if sign == -1 and (not mm2):
	coins += 2
print(coins)


N = int(input())
l = list(map(int, input().split(' ')))
coins = 0
x = False
c = 0
for i in range(N):
	if l[i] == 0:
		x = True
		c += 1
	if l[i] != 1 and l[i] != -1 and (l[i] != 0):
		c1 = abs(l[i] - 1)
		c2 = abs(l[i] + 1)
		coin = min(c1, c2)
		if l[i] < 0:
			l[i] = l[i] + coin
		else:
			l[i] -= coin
		coins += coin
n = 0
p = 0
for i in l:
	if i == -1:
		n += 1
	elif i == 1:
		p += 1
if n % 2 != 0:
	if x:
		coins += c
	else:
		coins += 2
elif x:
	coins += c
print(coins)


from collections import deque, Counter
import array
from itertools import combinations, permutations
from math import sqrt
import unittest

def read_int():
	return int(input().strip())

def read_int_array():
	return [int(i) for i in input().strip().split(' ')]
n = read_int()
a = read_int_array()
oddnum = 0
coins = 0
k = int(1000000000.0 + 7)
for e in a:
	coins += min(abs(e - -1), abs(e - 1))
	if e < 0:
		oddnum += 1
	else:
		k = min(k, abs(e - -1))
if oddnum % 2 != 0:
	coins += k
	coins -= abs(k - 2)
print(coins)


input()
l = [int(i) for i in input().split()]
s = 0
jok = False
for k in l:
	if k == 0:
		jok = True
		s += 1
	else:
		s += abs(k) - 1
c = 0
for j in l:
	if j < 0:
		c += 1
if c % 2 == 1 and (not jok):
	print(s + 2)
else:
	print(s)


n = int(input())
l = list(map(int, input().split()))
n = 0
nc = 0
p = 0
pc = 0
s = 0
for i in l:
	if i == 1 or i == 0:
		continue
	if i < 0:
		nc += 1
		if i == -1:
			continue
		n += i
	else:
		p += i
		pc += 1
z = l.count(0)
if z > 0:
	if nc % 2 != 0:
		z -= 1
		s += 1
elif nc % 2 != 0:
	s += 2
s += p - pc
s += abs(n) - nc + l.count(-1)
print(s + z)


n = int(input())
a = list(map(int, input().split()))
totneg = 0
tot = 0
zero = 0
for i in a:
	if i < 0:
		if i == 0:
			zero = 1
		totneg += 1
		tot += abs(i) - 1
	elif i == 0:
		zero = 1
		totneg += 1
		tot += 1
	else:
		tot += i - 1
if totneg % 2:
	if zero:
		print(tot)
	else:
		print(tot + 2)
else:
	print(tot)


n = int(input())
l = list(map(int, input().split()))
ans = 0
z = 0
sign = False
for i in l:
	if i < 0:
		ans += -1 - i
		sign ^= True
	elif i > 0:
		ans += i - 1
	else:
		z += 1
if z > 0:
	ans += z
elif sign == True:
	ans += 2
print(ans)


n = int(input())
numbers = list(map(int, input().split()))
cost = 0
zeros = 0
negative = 0
for i in range(len(numbers)):
	if numbers[i] > 0:
		cost += numbers[i] - 1
		numbers[i] = 1
	elif numbers[i] < 0:
		cost += -1 - numbers[i]
		numbers[i] = -1
		negative += 1
	else:
		zeros += 1
if zeros != 0:
	print(cost + zeros)
elif negative % 2 == 0:
	print(cost)
else:
	print(cost + 2)


input()
l = list(map(int, input().split()))
n = len(l)
ans = 0
nneg = 0
isNull = False
for i in range(n):
	x = l[i]
	if x >= 1:
		ans += x - 1
	elif x == 0:
		ans += 1
		isNull = True
	else:
		nneg += 1
		ans += -1 - x
if nneg % 2 != 0 and (not isNull):
	ans += 2
print(ans)


n = int(input())
a = list(map(int, input().split()))
a.sort()
x = 0
y = 0
ans = 0
for i in a:
	if i < 0:
		x += 1
		ans += abs(i + 1)
	elif i == 0:
		y += 1
		ans += 1
	else:
		ans += i - 1
if x != 0:
	if x % 2 == 1:
		if y == 0:
			ans += 2
print(ans)


n = int(input())
lis = list(map(int, input().split()))
ans = 0
zero = 0
neg = 0
for i in lis:
	if i < 0:
		ans += -1 - i
		neg += 1
	elif i == 0:
		zero += 1
	else:
		ans += i - 1
if zero != 0:
	ans += zero
elif neg % 2 != 0:
	ans += 2
print(ans)


def sum_coins(arr):
	a = 0
	b = 0
	z = 0
	for i in range(len(arr)):
		if arr[i] < 0:
			a += 1
		elif arr[i] > 0:
			b += 1
		elif arr[i] == 0:
			z += 1
	coins = 0
	if a % 2 == 0:
		for i in range(len(arr)):
			coins += abs(1 - abs(arr[i]))
	elif a % 2 != 0 and z > 0:
		for i in range(len(arr)):
			coins += abs(1 - abs(arr[i]))
	elif a % 2 != 0 and z <= 0:
		arr.sort()
		ele = arr.pop(0)
		coins += abs(1 - abs(ele)) + 2
		for i in range(len(arr)):
			coins += abs(1 - abs(arr[i]))
	return coins

def main():
	_ = input()
	arr = list(map(int, input().split()))
	print(sum_coins(arr))
main()


N = int(input())
L = list(map(int, input().split()))
(f, c, ans) = (0, 0, 0)
for i in L:
	if i == 0:
		f = 1
		ans += 1
	elif i < 0:
		c += 1
		ans = ans + (abs(i) - 1)
	else:
		ans = ans + i - 1
if f == 0 and c % 2 != 0:
	ans = ans + 2
print(ans)


t = int(input())
cnt = 0
su = 0

def init(a):
	for p in range(len(a)):
		a[p] = int(a[p])
	return a
d = input().split()
d = init(d)
n = []
p = []
z = []
for i in range(len(d)):
	if d[i] < 0:
		n.append(abs(d[i]))
		cnt = cnt + 1
	elif d[i] > 0:
		p.append(d[i])
	else:
		z.append(d[i])
n = sorted(n)
if len(z) > 0:
	su = len(z)
	for g in range(len(n)):
		su = su + abs(n[g] - 1)
	for k in range(len(p)):
		su = su + abs(p[k] - 1)
if len(z) == 0:
	if cnt % 2 == 0:
		for j in range(len(d)):
			su = su + abs(abs(d[j]) - 1)
	if cnt % 2 != 0:
		su = n[0] + 1
		d.remove(-n[0])
		for j in range(len(d)):
			su = su + abs(abs(d[j]) - 1)
print(su)


n = int(input())
a1 = input().split()
a = []
k = 0
m = 0
p = 0
y = 0
for i in a1:
	a.append(int(i))
for i in a:
	if i == 1:
		p += 1
	if i == -1:
		m += 1
	if i != 1 and i != -1:
		if i > 1:
			k += i - 1
			p += 1
		elif i < -1:
			k += -i - 1
			m += 1
		elif i == 0:
			if m % 2 != 0:
				k += 1
				m += 1
				y += 1
			else:
				k += 1
				p += 1
				y += 1
if m % 2 != 0:
	if y >= 1:
		pass
	else:
		k += 2
print(k)


def solve():
	cash = input()
	arr = list(map(int, input().split()))
	base_arr = [0] * len(arr)
	count_negatives = 0
	for i in range(len(arr)):
		base_arr[i] += min(abs(arr[i] - 1), abs(arr[i] + 1))
		if abs(arr[i] + 1) < abs(arr[i] - 1):
			count_negatives += 1
	answer = sum(base_arr)
	if count_negatives % 2 == 1:
		if 0 in arr:
			print(answer)
			return
		else:
			print(answer + 2)
			return
	print(answer)
solve()


n = int(input())
l = [*map(int, input().split())]
ans = 0
for i in range(n):
	if l[i] > 0:
		ans += l[i] - 1
		l[i] = 1
	elif l[i] < -1:
		ans += abs(l[i] + 1)
		l[i] = -1
neg = 0
pos = 0
zero = 0
for i in range(n):
	if l[i] > 0:
		pos += 1
	elif l[i] < 0:
		neg += 1
	else:
		zero += 1
if neg % 2 == 0:
	ans += zero
elif zero > 0 and (neg + zero) % 2 == 0:
	ans += zero
elif zero > 0 and (neg + zero) % 2 == 1:
	ans += zero
else:
	ans += 2
print(ans)


import math

def s():
	n = int(input())
	a = [int(x) for x in input().split(' ')]
	ans = 0
	num_neg = 0
	num_zeros = 0
	for x in a:
		if x > 0:
			ans += x - 1
		elif x < 0:
			ans += abs(0 - 1 - x)
			num_neg += 1
		else:
			num_zeros += 1
	if num_neg % 2 != 0 and num_zeros == 0:
		ans += 2
	ans += num_zeros
	return ans
ans = s()
print(ans)


n = int(input())
a = list(map(int, input().split()))
mi = 0
ans = 0
o = 0
for i in range(n):
	if a[i] < 0:
		ans += -1 - a[i]
		mi += 1
	elif a[i] == 0:
		o += 1
		ans += 1
	else:
		ans += a[i] - 1
if mi % 2 == 1:
	if o == 0:
		ans += 2
print(ans)


n = int(input())
ar = list(map(int, input().split()))
ar = sorted(ar)
neg = 0
ans = 0
for i in ar:
	if i <= 0:
		neg += 1
m = neg - neg % 2
for i in range(n):
	if m > 0:
		if ar[i] != 0:
			ans += -1 - ar[i]
		else:
			ans += 1
		m -= 1
	elif ar[i] != 0:
		ans += abs(1 - ar[i])
	else:
		ans += 1
print(ans)


n = int(input())
a = list(map(int, input().split()))
ans = 0
pr = 1
f = False
for c in a:
	if c < 0:
		ans += abs(c + 1)
		pr *= -1
	elif c > 0:
		ans += abs(c - 1)
	else:
		f = True
		ans += 1
if pr < 0 and (not f):
	ans += 2
print(ans)


def main():
	n = int(input())
	ip = [int(item) for item in input().split(' ')]
	n_coins = 0
	neg_cnt = 0
	zero_cnt = 0
	for i in range(len(ip)):
		if ip[i] == 0:
			zero_cnt += 1
			n_coins += 1
		elif ip[i] > 0:
			n_coins += ip[i] - 1
		elif ip[i] < 0:
			n_coins += -1 - ip[i]
			neg_cnt += 1
	if neg_cnt % 2 == 1 and zero_cnt == 0:
		n_coins += 2
	print(n_coins)
main()


n = int(input())
count_0 = 0
count_minus = 0
coin = 0
for num in map(int, input().split()):
	if num > 0:
		coin += num - 1
	elif num < 0:
		coin += -(num - 1)
		count_minus += 1
	else:
		count_0 += 1
if count_minus % 2 == 0:
	print(coin + count_0 - count_minus * 2)
else:
	subtract = count_minus * 2 if count_0 > 0 else (count_minus - 1) * 2
	print(coin + count_0 - subtract)


n = int(input())
a = list(map(int, input().split()))
a.sort()
(nv, count) = (0, 0)
for i in range(n):
	if a[i] < 0 and nv == 0 and (i != n - 1):
		nv += 1
		count += abs(a[i] - -1)
	elif a[i] < 0 and nv == 1 and (i != n - 1):
		nv = 0
		count += abs(a[i] - -1)
	elif a[i] < 0 and nv == 0 and (i == n - 1):
		count += abs(a[i] - -1) + 2
	elif a[i] < 0 and nv == 1 and (i == n - 1):
		count += abs(a[i] - -1)
	elif a[i] >= 0 and nv == 1:
		nv = 0
		count += abs(a[i] + 1)
	else:
		count += abs(a[i] - 1)
print(count)


n = int(input())
a = list(map(int, input().split()))
z = 0
n = 0
p = 0
for i in a:
	if i <= -1:
		n += 1
	elif i == 0:
		z += 1
	else:
		p += 1
su = 0
for i in range(len(a)):
	if a[i] <= -1:
		su += -1 - a[i]
	if a[i] >= 1:
		su += a[i] - 1
su += z
if n % 2 == 0:
	print(su)
elif z > 0:
	print(su)
else:
	print(su + 2)


(n, *a) = map(int, open(0).read().split())
b = [i for i in a if i > 0]
c = a.count(0)
d = [i for i in a if i < 0]
plus = sum(b) - len(b)
minus = -(sum(d) + len(d))
if len(d) % 2 and c < 1:
	minus += 2
print(plus + c + minus)


n = int(input())
a = list(map(int, input().split()))
less = sum((x < 0 for x in a))
greater = sum((x > 0 for x in a))
zero = a.count(0) >= 1
total = sum((abs(abs(x) - 1) for x in a))
if zero or less % 2 == 0:
	print(total)
else:
	print(total + 2)


import sys, math, queue
MOD = 998244353
sys.setrecursionlimit(1000000)
n = int(input())
a = list(map(int, input().split()))
ans = 0
z = 0
p = 1
for i in range(n):
	if a[i] == 0:
		ans += 1
		a[i] = 1
		z += 1
	elif a[i] > 0:
		ans += a[i] - 1
		a[i] = 1
	else:
		ans += -1 - a[i]
		a[i] = -1
	p *= a[i]
if p == 1:
	print(ans)
elif z > 0:
	print(ans)
else:
	print(ans + 2)


n = int(input())
l = [int(i) for i in input().split()]
c = 0
for i in range(n):
	if l[i] < 0:
		c += -1 - l[i]
		l[i] = -1
	if l[i] > 0:
		c += l[i] - 1
		l[i] = 1
k = 0
if l.count(-1) % 2 != 0:
	if 0 in l:
		for i in range(n):
			if l[i] == 0:
				if k == 0:
					l[i] = -1
					c += 1
					k = 1
				else:
					l[i] = 1
					c += 1
	else:
		for i in range(n):
			if l[i] == -1:
				if k == 0:
					c += 2
					l[i] = 1
					k = 1
else:
	for i in range(n):
		if l[i] == 0:
			c += 1
			l[i] = 1
print(c)


n = int(input())
a = list(map(int, input().split()))
b = []
c = 0
for i in range(n):
	if a[i] < -1:
		c += -1 - a[i]
		b.append(-1)
	elif a[i] > 1:
		c += a[i] - 1
		b.append(1)
	elif a[i] == -1 or a[i] == 1:
		b.append(a[i])
p = b.count(-1)
q = a.count(0)
r = b.count(1)
if p % 2 != 0:
	if q > 0:
		c += 1
		q -= 1
	else:
		c += 2
c += q
print(c)


n = int(input())
l = list(map(int, input().split()))
p = 1
z = 0
c = 0
for x in l:
	if x == 0:
		z += 1
	elif x > 0:
		c += x - 1
	else:
		p *= -1
		c += -x - 1
if p == 1:
	print(z + c)
elif z > 0:
	print(z + c)
else:
	print(c + 2)


n = int(input())
l = list(map(int, input().split()))
t1 = []
t2 = []
zero = 0
for i in range(n):
	if l[i] < 0:
		t1.append(abs(l[i]))
	elif l[i] > 0:
		t2.append(abs(l[i]))
	else:
		zero = zero + 1
k = 0
if len(t1) % 2 == 1:
	if zero:
		k = 0
	else:
		k = 2
print(sum(t1) - len(t1) + sum(t2) - len(t2) + k + zero)


def solve(n, a):
	(s, k, nm1) = (0, 0, 0)
	for i in range(n):
		if a[i] > 0:
			s += a[i] - 1
		elif a[i] < 0:
			s += abs(a[i] + 1)
			nm1 += 1
		else:
			k += 1
	if k == 0:
		return s + 2 if nm1 % 2 == 1 else s
	else:
		return s + k

def main():
	n = int(input())
	a = list(map(int, input().split()))
	print(solve(n, a))
main()


n = int(input())
arr = input().split()
neg1 = 0
pos1 = 0
num0 = 0
count = 0
for i in range(n):
	if int(arr[i]) < 0:
		neg1 += 1
		count += -1 - int(arr[i])
	elif int(arr[i]) > 0:
		pos1 += 1
		count += int(arr[i]) - 1
	else:
		num0 += 1
		count += 1
if num0 == 0 and (neg1 == 1 or neg1 % 2 != 0):
	count += 2
print(count)


summ = neg = pos = zeros = 0
(n, data) = (int(input()), map(int, input().split()))
for _ in range(n):
	a = next(data)
	if a < 0:
		neg += 1
		summ += -a - 1
	elif a > 0:
		pos += 1
		summ += a - 1
	else:
		zeros += 1
		summ += 1
if neg % 2 == 1 and zeros == 0:
	summ += 2
print(summ)


import sys
num_of_sequence = int(sys.stdin.readline())
sequence = list(map(int, sys.stdin.readline().split()))
num_process = 0
num_minus = 0
num_zeros = 0
for i in range(num_of_sequence):
	if sequence[i] > 0:
		num_process += sequence[i] - 1
	elif sequence[i] < 0:
		num_minus += 1
		num_process += -(sequence[i] + 1)
	else:
		num_zeros += 1
		num_process += 1
if num_zeros > 0:
	print(num_process)
elif num_minus % 2 == 0:
	print(num_process)
else:
	print(num_process + 2)


import sys
n = int(sys.stdin.readline())
a = [int(i) for i in sys.stdin.readline().split()]
cn = 0
c = 0
for i in a:
	if i < 0:
		cn += 1
for i in range(n):
	if a[i] == 0:
		if cn % 2 != 0:
			a[i] -= 1
			c += 1
			cn += 1
		else:
			a[i] += 1
			c += 1
for i in range(n):
	if a[i] > 0:
		c += a[i] - 1
		a[i] = 1
	elif a[i] < 0:
		if cn % 2 != 0:
			c += abs(a[i]) + 1
			a[i] = 1
			cn -= 1
		else:
			c += abs(a[i]) - 1
			a[i] = -1
sys.stdout.write(str(c))


def sol():
	n = int(input())
	A = [int(i) for i in input().split()]
	cnt = 0
	ncnt = 0
	zcnt = 0
	for i in range(n):
		cnt += abs(abs(A[i]) - 1)
		if A[i] < 0:
			ncnt += 1
		elif A[i] == 0:
			zcnt += 1
	if ncnt % 2 == 1 and zcnt == 0:
		cnt += 2
	print(cnt)
sol()


n = int(input())
numbers = [int(x) for x in input().split()]
cost = 0
total_sign_plus = True
has_zeros = False
for num in numbers:
	if num > 0:
		cost += num - 1
	elif num == 0:
		cost += 1
		has_zeros = True
	else:
		cost += -(num + 1)
		total_sign_plus = not total_sign_plus
if not total_sign_plus and (not has_zeros):
	cost += 2
print(cost)


n = int(input())
a = list(map(int, input().split()))
cn = 0
c0 = 0
for i in range(n):
	if a[i] > 0 and a[i] != 1:
		cn += abs(1 - a[i])
		a[i] = 1
	elif a[i] < 0 and a[i] != -1:
		cn += abs(a[i] + 1)
		a[i] = -1
	elif a[i] == 0:
		c0 += 1
p = 1
for i in range(n):
	if a[i] != 0:
		p *= a[i]
if p == -1 and c0 != 0:
	cn += c0
elif p == 1:
	cn += c0
else:
	cn += 2
print(cn)


def main():
	n = int(input())
	arr = list(map(int, input().split()))
	pos_count = 0
	neg_count = 0
	zero_count = 0
	cost = 0
	for i in range(len(arr)):
		if arr[i] > 0:
			pos_count += 1
			cost += arr[i] - 1
		elif arr[i] < 0:
			neg_count += 1
			cost += -arr[i] - 1
		else:
			zero_count += 1
			cost += 1
	if neg_count % 2 != 0 and zero_count == 0:
		cost += 2
	return cost
print(main())


n = input()
s = list(map(int, input().split(' ')))
ans = 0
countOfzero = 0
countOfminus = 0
for i in range(len(s)):
	if s[i] > 0:
		ans += s[i] - 1
		s[i] = 1
	if s[i] < 0:
		ans -= s[i] + 1
		s[i] = -1
		countOfminus += 1
	if s[i] == 0:
		countOfzero += 1
if countOfzero > 0:
	ans += countOfzero
if countOfzero == 0 and countOfminus % 2 != 0:
	ans += 2
print(ans)


def makeProductOne(arr):
	con = 0
	c = 0
	neg = 0
	pos = 0
	for numero in arr:
		if numero < 0:
			neg = neg + 1
			con = con - (1 + numero)
		elif numero == 0:
			c = c + 1
		else:
			pos = pos + 1
			con = con + (numero - 1)
	if neg % 2 == 0:
		con = con + c
	elif c > 0:
		con = con + c
	else:
		con = con + 2
	return con
n = int(input())
arr = list(map(int, input().split()))
print(makeProductOne(arr))


def solve():
	global n, a
	dp = [[0, 0] for _ in range(n)]
	dp[0][0] = abs(a[0] - 1)
	dp[0][1] = abs(a[0] + 1)
	for i in range(1, n):
		(to1, tom1) = (abs(a[i] - 1), abs(a[i] + 1))
		dp[i][0] = min(dp[i - 1][0] + to1, dp[i - 1][1] + tom1)
		dp[i][1] = min(dp[i - 1][0] + tom1, dp[i - 1][1] + to1)
	return dp[n - 1][0]

def main():
	global n, a
	n = int(input())
	a = list(map(int, input().split()))
	print(solve())
main()


s = 0
t = 0
p = 0
n = int(input())
a = list(map(int, input().split()))
for i in range(n):
	if a[i] < -1:
		s += -a[i] - 1
		t += 1
	elif a[i] == -1:
		t += 1
	elif a[i] > 1:
		s += a[i] - 1
	elif a[i] == 0:
		s += 1
		p += 1
if t % 2 == 1 and p == 0:
	s += 2
print(s)


t = int(input())
l = list(map(int, input().split()))
s = 0
n = 0
if l.count(0) == 0:
	for i in l:
		if i < 0:
			s = abs(i) - 1 + s
			n = n + 1
		if i > 0:
			s = s + i - 1
	if n % 2 == 0:
		print(s)
	else:
		print(s + 2)
else:
	for i in l:
		s = s + abs(abs(i) - 1)
	print(s)


n = int(input())
a = list(map(int, input().strip().split()))
zero = 0
mone = 0
pone = 0
ans = 0
for i in range(0, n):
	if a[i] > 1:
		ans += a[i] - 1
		pone += 1
	elif a[i] == 0:
		zero += 1
	elif a[i] < -1:
		mone += 1
		ans += -1 - a[i]
	elif a[i] == -1:
		mone += 1
if mone % 2 == 0:
	print(ans + zero)
elif zero > 0:
	print(ans + zero)
else:
	print(ans + 2)


def R():
	return map(int, input().split())

def I():
	return int(input())

def S():
	return str(input())

def L():
	return list(R())
from collections import Counter
import math
import sys
from itertools import permutations
n = I()
a = L()
dp = [0] * (n + 1)
dp2 = [0] * (n + 1)
dp2[0] = math.inf
for i in range(n):
	if a[i] >= 1:
		c = a[i] - 1
		d = a[i] + 1
	else:
		c = -a[i] + 1
		d = abs(-a[i] - 1)
	dp[i + 1] = min(dp[i] + c, dp2[i] + d)
	dp2[i + 1] = min(dp2[i] + c, dp[i] + d)
print(dp[n])


n = int(input())
b = tuple([int(x) for x in input().split()])
c = tuple(filter(lambda x: x < 0, b))
d = tuple(filter(lambda x: x >= 0, b))
gold = 0
for i in c:
	gold += abs(-1 - i)
for i in d:
	gold += abs(1 - i)
if 0 in d:
	print(gold, end='')
elif len(c) % 2 == 0:
	print(gold, end='')
else:
	print(gold + 2)


from sys import stdin
input = stdin.readline
n = int(input())
a = list(map(int, input().split()))
a.sort()
b = [i for i in a if i <= -1]
c = [i for i in a if i >= 1]
d = [i for i in a if i == 0]
k = len(b)
if k % 2 == 0:
	t = -k - sum(b)
	t += len(d) * 1
	t += sum(c) - len(c)
	print(t)
else:
	p = len(d)
	if p > 0:
		t = -k - sum(b)
		t += (p - 1) * 1
		t += sum(c) - len(c)
		print(t + 1)
	else:
		t = -k - sum(b)
		t += sum(c) - len(c)
		print(t + 2)


n = int(input())
cnt = 0
neg_cnt = 0
zer_cnt = 0
for ch in input().split():
	c = int(ch)
	if c < 0:
		cnt += abs(c) - 1
		neg_cnt += 1
	elif c == 0:
		cnt += 1
		zer_cnt += 1
	else:
		cnt += c - 1
print(cnt if neg_cnt % 2 == 0 else cnt if zer_cnt > 0 else cnt + 2)


q = int(input())
l = list(map(int, input().split(' ')))
a = 0
b = 0
l.sort()
for i in l:
	if i < 0:
		a += -1 - i
		b += 1
	elif i == 0:
		a += 1
		if b % 2 != 0:
			b += 1
	else:
		a += i - 1
if b % 2 != 0:
	print(a + 2)
else:
	print(a)


from sys import stdin, stdout
import math, sys, heapq
from itertools import permutations, combinations
from collections import defaultdict, deque, OrderedDict
from os import path
import random
import bisect as bi

def yes():
	print('YES')

def no():
	print('NO')
if path.exists('input.txt'):
	sys.stdin = open('input.txt', 'r')
	sys.stdout = open('output.txt', 'w')

	def I():
		return int(input())

	def In():
		return map(int, input().split())
else:

	def I():
		return int(stdin.readline())

	def In():
		return map(int, stdin.readline().split())

def dict(a):
	d = {}
	for x in a:
		if d.get(x, -1) != -1:
			d[x] += 1
		else:
			d[x] = 1
	return d

def find_gt(a, x):
	i = bi.bisect_left(a, x)
	if i != len(a):
		return i
	else:
		return -1

def main():
	try:
		n = I()
		ans = 0
		cnt = 0
		noz = 0
		l = list(In())
		for x in range(n):
			if l[x] < 0:
				cnt += 1
				ans += abs(l[x] + 1)
			elif l[x] == 0:
				noz += 1
			else:
				ans += abs(l[x] - 1)
		if cnt & 1 == 1:
			if noz:
				ans += 1
				noz -= 1
			else:
				ans += 2
		ans += noz
		print(ans)
	except:
		pass
M = 998244353
P = 1000000007
for _ in range(1):
	main()


n = int(input())
arr = list(map(int, input().split()))
count = 0
neg = zero = 0
for i in range(n):
	if arr[i] > 0:
		count += arr[i] - 1
	elif arr[i] < 0:
		count += -1 - arr[i]
		neg += 1
	else:
		zero += 1
		count += 1
if neg % 2 == 0 or zero > 0:
	print(count)
else:
	print(count + 2)


n = int(input())

def intmaker(arr):
	for i in range(len(arr)):
		arr[i] = int(arr[i])
	return arr
nums = intmaker(input().split())
total = 0
product = 1
for i in range(n):
	if nums[i] > 0:
		total += nums[i] - 1
		nums[i] = 1
	elif nums[i] < 0:
		total += -1 - nums[i]
		product *= -1
		nums[i] = -1
for i in range(n):
	if nums[i] == 0:
		total += 1
		if product < 0:
			product *= -1
if product == -1:
	total += 2
print(total)


MOD = 10 ** 9 + 7
I = lambda : list(map(int, input().split()))
(n,) = I()
l = I()
ans = 0
c = 0
o = 0
e = 0
for i in range(n):
	if l[i] == 0:
		c += 1
		continue
	if l[i] > 0:
		e += 1
		ans += l[i] - 1
	else:
		o += 1
		ans += -l[i] - 1
if o % 2 == 0:
	print(ans + c)
elif o % 2 == 1:
	if c:
		print(ans + c)
	else:
		print(ans + 2)


n = int(input())
A = list(map(int, input().split()))
A.sort()
p = 1
z = 0
coins = 0
for i in A:
	if i > 1:
		coins += i - 1
	elif i < 0:
		coins += abs(i) - 1
		p *= -1
	elif i == 0:
		z += 1
if z == 0 and p == -1:
	coins += 2
else:
	coins += z * 1
print(coins)


n = int(input())
a = list(map(int, input().split()))
neg_num_cnt = sum((1 if i < 0 else 0 for i in a))
zero_cnt = a.count(0)
cost = sum((min(abs(i - 1), abs(-1 - i)) for i in a))
if neg_num_cnt % 2 != 0 and zero_cnt == 0:
	cost += 2
print(cost)


n = int(input())
x = [int(n) for n in input().split()]
s = []
ctr = 0
c = 0
z = 0
for i in range(n):
	if x[i] > 1:
		c += x[i] - 1
		x[i] = 1
	elif x[i] <= -1:
		c += -1 - x[i]
		x[i] = -1
		ctr += 1
	elif x[i] == 0:
		z += 1
		c += 1
		x[i] = 1
if ctr & 1:
	if z == 0:
		c += 2
print(c)


n = int(input())
l = [int(x) for x in input().split()]
sum = 0
ncnt = 0
min = -1
for i in range(0, n):
	if l[i] < 0:
		ncnt += 1
		sum = sum + (0 - l[i]) - 1
	else:
		if l[i] == 0:
			sum = sum + 1
		else:
			sum = sum + (l[i] - 1)
		if min == -1:
			min = l[i]
		if l[i] < min:
			min = l[i]
if ncnt % 2 == 0:
	print(sum)
elif min == 0:
	print(sum)
else:
	sum = sum + 2
	print(sum)


n = int(input())
coins = 0
contador = 0
array = sorted(list(map(int, input().split())))
for i in range(n):
	if array[i] < 0:
		coins += -1 * array[i] - 1
		contador += 1
	elif array[i] > 0:
		coins += array[i] - 1
	else:
		if contador % 2 > 0:
			contador += 1
		coins += 1
if contador % 2 > 0:
	coins += 2
print(coins)


n = int(input())
queryInp = input()
query = [int(elem) for elem in queryInp.split(' ')]
posCount = 0
negCount = 0
zeroCount = 0
coins = 0
for elem in query:
	if elem == 0:
		zeroCount = zeroCount + 1
		coins = coins + 1
	if elem > 0:
		posCount = posCount + 1
		coins = coins + elem - 1
	if elem < 0:
		negCount = negCount + 1
		coins = coins - (elem + 1)
if negCount % 2 == 1:
	if zeroCount > 0:
		pass
	else:
		coins = coins + 2
print(coins)


n = int(input())
a = [int(x) for x in input().split()]
p = 1
ans = 0
zero = 0
for i in a:
	if i == -1 or i == 1:
		p *= i
		continue
	if i < -1:
		ans += -1 - i
		p *= -1
	elif i > 1:
		ans += i - 1
	else:
		zero += 1
if p == -1:
	if zero > 0:
		print(ans + zero)
	else:
		print(ans + 2)
else:
	print(ans + zero)


n = int(input())
a = list(map(int, input().split()))
(z, summ, cnt) = (0, 1, 0)
for i in range(len(a)):
	if a[i] == 0:
		z += 1
	elif a[i] not in {-1, 1, 0}:
		cnt = cnt + abs(a[i]) - 1
	if a[i] < 0:
		a[i] = -1
	else:
		a[i] = 1
	summ *= a[i]
if summ == 1 or (summ == -1 and z != 0):
	print(cnt + z)
else:
	print(cnt + 2)


from sys import stdin, stdout
import math
import copy
N = int(input())
arr = [int(x) for x in stdin.readline().split()]
c = [0] * N
pos = 0
neg = 0
zero = 0
for i in range(N):
	c[i] = min(abs(arr[i] + 1), abs(arr[i] - 1))
	if arr[i] == 0:
		zero += 1
	elif arr[i] > 0:
		pos += 1
	else:
		neg += 1
if neg % 2 == 1 and zero == 0:
	print(sum(c) + 2)
else:
	print(sum(c))


n = int(input())
l = list(map(int, input().split()))
l.sort()
i = 0
flag = -1
countn = 0
coin = 0
while i < len(l) and l[i] < 0:
	countn = countn + 1
	i = i + 1
if i == len(l):
	i = i - 1
flag = i
if countn % 2 == 0:
	for j in l:
		if j < 0:
			coin = coin + abs(-1 - j)
		else:
			coin = coin + abs(j - 1)
elif l[flag] < 0:
	for j in l[:len(l) - 1]:
		coin = coin + abs(-1 - j)
	coin = coin + abs(1 - l[flag])
else:
	x = abs(l[flag] - -1)
	y = abs(1 - l[flag - 1])
	if x < y:
		l[flag] = -1
		coin = coin + x
	else:
		l[flag - 1] = 1
		coin = coin + y
	for j in l:
		if j < 0:
			coin = coin + abs(-1 - j)
		else:
			coin = coin + abs(j - 1)
print(coin)


a = input()
la = list(map(int, input().split()))
s = 0
nb = 0
nb0 = 0
for i in range(len(la)):
	if la[i] == 0:
		nb0 += 1
	if la[i] < 0:
		nb += 1
		s += abs(la[i] - 1)
		la[i] = 1
	elif la[i] != 1 and la[i] >= 0:
		s += abs(la[i] - 1)
		la[i] = 1
if nb % 2 == 0:
	print(s - nb * 2)
elif nb % 2 != 0 and nb0 == 0:
	nb -= 1
	print(s - nb * 2)
elif nb0 > 0 and nb % 2 != 0:
	print(s - nb * 2)


n = int(input())
a = [int(x) for x in input().split()]
count = 0
flag = True
zc = 0
for number in a:
	if number < 0:
		count = count + abs(number) - 1
		flag = not flag
	elif number > 0:
		count = count + abs(number) - 1
	else:
		zc = zc + 1
if zc == 0 and flag is False:
	print(count + 2)
else:
	print(count + zc)


n = int(input(''))
arr = list(map(int, input().split()))
neg = 0
cnt0 = 0
sol = 0
for i in arr:
	if i == 0:
		cnt0 += 1
		sol += 1
	elif i > 0:
		sol += i - 1
	else:
		sol += -1 - i
		neg += 1
if cnt0 == 0 and neg % 2 == 1:
	sol += 2
print(sol)


import sys
input = sys.stdin.readline
n = int(input())
l = [int(i) for i in input().split()]
pos = 0
neg = 0
z = 0
ans = 0
for x in l:
	if x > 0:
		pos += 1
		ans += x - 1
	elif x < 0:
		neg += 1
		ans += -1 - x
	else:
		z += 1
		ans += 1
if neg % 2 == 0:
	print(ans)
elif z > 0:
	print(ans)
else:
	print(ans + 2)


n = int(input())
a = list(map(int, input().split(' ')))
coins = 0
for i in range(n):
	if a[i] < -1:
		coins += -1 - a[i]
		a[i] = -1
	elif a[i] > 1:
		coins += a[i] - 1
		a[i] = 1
	elif a[i] == 0:
		coins += 1
prod = 1
for i in a:
	if i != 0:
		prod *= i
if prod == -1 and 0 in a:
	print(coins)
elif prod == -1 and 0 not in a:
	print(coins + 2)
elif prod == 1 and 0 in a:
	print(coins)
else:
	print(coins)


n = int(input())
a = list(map(int, input().split()))
ans = k_n = k_0 = 0
for x in a:
	if x < 0:
		ans += -1 - x
		k_n += 1
	elif x > 0:
		ans += x - 1
	else:
		ans += 1
		k_0 += 1
if k_n % 2 and (not k_0):
	ans += 2
print(ans)


n = int(input())
num = map(int, input().split())
out = 0
neg = pos = zero = 0
for i in num:
	if i == 0:
		zero += 1
	if i > 0:
		pos += 1
		out += i - 1
	if i < 0:
		neg += 1
		out += -i - 1
out += zero
if neg % 2 == 1:
	if zero == 0:
		out += 2
print(out)


n = int(input())
a = list(map(int, input().split()))
pos = []
neg = []
for i in a:
	if i >= 0:
		pos.append(i)
	else:
		neg.append(i)
if len(neg) == 0 or len(neg) % 2 == 0:
	c1 = 0
	c2 = 0
	for i in pos:
		c1 += abs(1 - i)
	for i in neg:
		c2 += abs(-1 - i)
	print(c1 + c2)
elif len(pos) == 0:
	c1 = 0
	c2 = 0
	for i in neg:
		c1 += abs(-1 - i)
	if len(neg) % 2 == 1:
		c1 += 2
	print(c1)
elif len(neg) % 2 == 1:
	c1 = 0
	c2 = 0
	for i in pos:
		c1 += abs(1 - i)
	for i in neg:
		c2 += abs(-1 - i)
	if 0 not in pos:
		c1 += 2
	print(c1 + c2)


a = int(input())
s = input().split()
l = []
c = 0
n = 0
o = 0
for i in s:
	if int(i) < 0:
		n += 1
		c -= int(i) + 1
	elif int(i) > 0:
		c += int(i) - 1
	else:
		o += 1
c += o
if n % 2 == 1:
	if o == 0:
		c += 2
print(c)


n = int(input())
nums = []
nums = input().split()
change_num = 0
neg_num = 0
zero_num = 0
for i in range(len(nums)):
	num = int(nums[i])
	if num < 0:
		change_num += -(num - -1)
		neg_num += 1
	elif num > 0:
		change_num += num - 1
	else:
		change_num += 1
		zero_num += 1
if (neg_num == 0 or neg_num % 2 == 0) or zero_num != 0:
	print(change_num)
else:
	print(change_num + 2)


N = int(input())
n = input().split(' ')
for i in range(N):
	n[i] = int(n[i])
negativos = 0
soma = 0
zeros = 0
for i in range(N):
	if n[i] < 0:
		negativos += 1
		soma += n[i] * -1 - 1
	elif n[i] > 0:
		soma += n[i] - 1
	else:
		zeros += 1
if negativos % 2 == 0 or zeros != 0:
	soma += zeros
else:
	soma += 2
print(soma)


from bisect import bisect_left
n = int(input())
a = list(map(int, input().split()))
a.sort()
t = bisect_left(a, 0)
ans = 0
if t % 2 == 0:
	for s in a:
		if s < 0:
			ans += -1 - s
		elif s == 0:
			ans += 1
		else:
			ans += s - 1
elif t == n:
	for s in a:
		ans += -1 - s
	ans += 2
elif -a[t - 1] < a[t]:
	for i in range(n):
		if i == t - 1:
			ans += 1 - a[t - 1]
		elif a[i] < 0:
			ans += -1 - a[i]
		else:
			ans += a[i] - 1
else:
	for i in range(n):
		if i == t:
			ans += a[i] + 1
		elif a[i] < 0:
			ans += -1 - a[i]
		elif a[i] == 0:
			ans += 1
		else:
			ans += a[i] - 1
print(ans)


n = int(input())
a = [int(ele) for ele in input().split()]
pos = 0
neg = 0
zero = 0
for ele in a:
	if ele < 0:
		neg += 1
	elif ele > 0:
		pos += 1
	else:
		zero += 1
zc = 0
if neg % 2 != 0:
	if zero > 0:
		zc = 1
	else:
		zc = -1
cost = 0
for ele in a:
	if ele > 0:
		cost += ele - 1
	elif ele == 0:
		cost += 1
	elif zc == 1 or zc == 0:
		cost += -1 - ele
	else:
		cost += -1 - ele + 2
		zc = 1
print(cost)


def solve(n, s):
	dp = [0] * n
	cnt = 0
	cost = 0
	for i in range(n):
		if s[i] < 0:
			cost = abs(s[i] + 1)
			cnt += 1
			dp[i] = dp[i - 1] + cost
		elif s[i] == 0:
			cost = 1
			dp[i] = dp[i - 1] + cost
		else:
			cost = abs(s[i] - 1)
			dp[i] = dp[i - 1] + cost
		cost = 0
	if cnt % 2 == 0:
		print(dp[n - 1])
	elif 0 in s:
		print(dp[n - 1])
	else:
		print(dp[n - 1] + 2)
n = int(input())
ar = list(map(int, input().split()))
solve(n, ar)


def solve(arr, n):
	evenNeg = 0
	arr.sort(reverse=True)
	ans = 0
	for i in range(n):
		x = arr[i]
		if x > 0:
			ans += x - 1
		else:
			ans += abs(x + 1)
			evenNeg += 1
	if evenNeg % 2 != 0:
		if arr.count(0) == 0:
			ans += 2
	print(ans)

def main():
	n = int(input())
	arr = list(map(int, input().split()))
	solve(arr, n)
main()


n = int(input())
a_vec = list(map(int, input().split()))
dp_plus = [0] * n
dp_minus = [0] * n
dp_plus[0] = abs(a_vec[0] - 1)
dp_minus[0] = abs(a_vec[0] + 1)
for i in range(1, n):
	i_plus = abs(a_vec[i] - 1)
	i_minus = abs(a_vec[i] + 1)
	dp_plus[i] = min(dp_plus[i - 1] + i_plus, dp_minus[i - 1] + i_minus)
	dp_minus[i] = min(dp_plus[i - 1] + i_minus, dp_minus[i - 1] + i_plus)
print(dp_plus[n - 1])


from sys import stdin, stdout

def main():
	x = stdin.read().split('\n')
	a = list(map(int, x[1].split(' ')))
	thereis0 = False
	for x in a:
		if x == 0:
			thereis0 = True
	negative = False
	cost = 0
	for x in a:
		cost += abs(abs(x) - 1)
		if x < 0:
			negative = not negative
	if negative and (not thereis0):
		cost += 2
	print(cost)
main()


n = int(input())
arr = list(map(int, input().split()))
(x, y, z) = (0, 0, 0)
count = 0
for a in arr:
	if a > 0:
		count += a - 1
		x += 1
	elif a < 0:
		y += 1
		count += abs(a) - 1
	else:
		z += 1
		count += 1
if y % 2 == 1 and z == 0:
	print(count + 2)
else:
	print(count)


def inp(dtype=str, strip=True):
	s = input()
	res = [dtype(p) for p in s.split()]
	res = res[0] if len(res) == 1 and strip else res
	return res

def problem1():
	n = inp(int)
	a = inp(int, strip=False)
	m = inp(int)
	b = inp(int, strip=False)
	union = set(a + b)
	for k1 in a:
		for k2 in b:
			if k1 + k2 not in union:
				print(k1, k2)
				return

def problem2():
	n = inp(int)
	a = inp(int, strip=False)
	res = 0
	has0 = False
	negs = 0
	for k in a:
		if k < 0:
			negs += 1
		if k == 0:
			has0 = True
			res += 1
		else:
			res += abs(k) - 1
	if negs % 2 == 1 and (not has0):
		res += 2
	print(res)

def problem3():
	pass

def problem4():
	pass
problem2()


n = input()
val = list(map(int, input().split(' ')))
arr = [0 for x in range(len(val))]
countz = 0
countn = 0
countp = 0
min = 0
for i in val:
	if i != 0:
		if abs(1 - i) > abs(-1 - i):
			countn += 1
			min += abs(-1 - i)
		else:
			countp += 1
			min += abs(1 - i)
	else:
		countz += 1
if countn % 2 != 0:
	if countz != 0:
		min += countz
	else:
		min += 2
else:
	min += countz
print(min)


size = int(input())
array = list(map(int, input().split(' ')))

def getCostToOne(number):
	return abs(number - 1)

def getCostToMinusOne(number):
	return abs(number - -1)

def getCost(number):
	costToOne = getCostToOne(number)
	costToMinusOne = getCostToMinusOne(number)
	if costToOne < costToMinusOne:
		return (costToOne, 1)
	else:
		return (costToMinusOne, -1)
if len(array) == 1:
	print(getCostToOne(array[0]))
else:
	index = 0
	operationsCount = 0
	sign = 1
	zeroesCount = 0
	while index < size:
		if array[index] != 0:
			(cost, currSign) = getCost(array[index])
			operationsCount += cost
			sign *= currSign
		else:
			zeroesCount += 1
		index += 1
	if zeroesCount == 0 and sign == -1:
		operationsCount += 2
	print(operationsCount + zeroesCount)


n = int(input())
a = list(map(int, input().split()))
neg = [0 for i in range(n)]
pos = [0 for i in range(n)]
neg[0] = abs(a[0] + 1)
pos[0] = abs(a[0] - 1)
for i in range(1, n):
	neg[i] = min(abs(a[i] - 1) + neg[i - 1], abs(a[i] + 1) + pos[i - 1])
	pos[i] = min(abs(a[i] + 1) + neg[i - 1], abs(a[i] - 1) + pos[i - 1])
print(pos[n - 1])


n = int(input())
A = [int(i) for i in input().split()]
A.sort()
ans = 0
(neg, pos, zero) = (0, 0, 0)
for i in range(n):
	if A[i] < 0:
		neg += 1
		ans += abs(A[i]) - 1
	elif A[i] > 0:
		pos += 1
		ans += abs(A[i]) - 1
	else:
		zero += 1
if zero == 0:
	if neg % 2 == 1:
		print(ans + 2)
	else:
		print(ans)
else:
	print(ans + zero)


n = int(input())
a = list(map(int, input().split()))
res = 0
c = 0
c0 = 0
for e in a:
	if e != 0:
		res += abs(e - (-1 if e < 0 else 1))
		c += 1 if e < 0 else 0
for e in a:
	if e == 0:
		c0 += 1
print(res + (c % 2 * 2 if c0 == 0 else c0))


input()
c = 0
cc = 0
l = list(map(int, input().split()))
for i in range(len(l)):
	if l[i] < -1:
		c += abs(l[i]) - 1
		l[i] = -1
	if l[i] > 1:
		c += l[i] - 1
a = l.count(-1)
b = l.count(0)
print(b + c if a % 2 == 0 else b + c if b > 0 else b + c + 2)


import sys

def main():
	n = sys.stdin.readline()
	A = [int(x) for x in sys.stdin.readline().split(' ')]
	numZero = len([x for x in A if x == 0])
	numNeg = len([x for x in A if x < 0])
	numPos = len(A) - numNeg - numZero
	coins = numZero
	for num in A:
		if num > 0:
			coins += abs(1 - num)
		elif num < 0:
			coins += abs(-1 - num)
	if numNeg % 2 == 1 and numZero == 0:
		coins += 2
	return coins
print(main())


n = int(input())
a = list(map(int, input().split()))
f = [[0] * 2 for i in range(n + 1)]
f[0][0] = abs(a[0] + 1)
f[0][1] = abs(a[0] - 1)
for i in range(1, n):
	f[i][0] = min(abs(a[i] - 1) + f[i - 1][0], abs(a[i] + 1) + f[i - 1][1])
	f[i][1] = min(abs(a[i] - 1) + f[i - 1][1], abs(a[i] + 1) + f[i - 1][0])
print(f[n - 1][1])


n = int(input())
a = list(map(int, input().split()))
a.sort()
ans = 0
for i in range(0, n - 1, 2):
	ans += min(abs(-1 - a[i + 1]) + abs(-1 - a[i]), abs(1 - a[i + 1]) + abs(1 - a[i]))
if n % 2 == 1:
	ans += abs(1 - a[n - 1])
print(ans)


n = int(input())
count = 0
p = 0
l = sorted(list(map(int, input().split())))
for i in range(n):
	if l[i] > 0:
		count += l[i] - 1
	elif l[i] < 0:
		p += 1
		if p < 2:
			count += 1 - l[i]
		else:
			count += -1 - l[i]
			count -= 2
			p = 0
	elif p > 0:
		count -= 1
		p -= 1
	else:
		count += 1
print(abs(count))


n = int(input())
A = list(map(int, input().split()))
ans = sum((abs(abs(a) - 1) for a in A))
ans += 2 * (0 not in A and sum((a < 0 for a in A)) % 2)
print(ans)


def main():
	size = int(input())
	input_list = input().split()
	cost = 0
	zeroes_present = False
	final_product = 1
	for i in range(size):
		element = int(input_list[i])
		if element <= -1:
			cost += -1 - element
			final_product *= -1
		elif element > 1:
			cost += element - 1
		elif element == 0:
			cost += 1
			zeroes_present = True
	if zeroes_present or final_product == 1:
		print(cost)
	elif final_product == -1:
		print(cost + 2)
main()


n = int(input())
l = list(map(int, input().strip().split(' ')))
count0 = 0
count1 = 0
count11 = 0
result = 0
finalResult = 0
for i in range(n):
	if -1 <= l[i] <= 1:
		if l[i] == 0:
			count0 += 1
		elif l[i] == 1:
			count1 += 1
		else:
			count11 += 1
	else:
		if l[i] > 1:
			result = l[i] - 1
			l[i] -= result
			count1 += 1
		else:
			result = abs(l[i]) - 1
			l[i] += result
			count11 += 1
		finalResult += result
if count0 == 0:
	if count11 % 2 == 0:
		print(finalResult)
	else:
		print(finalResult + 2)
elif count11 % 2 == 0:
	print(finalResult + count0)
else:
	print(finalResult + count0)


n = int(input())
arr = list(map(int, input().split()))
res = 0
for i in range(n):
	if arr[i] == 0:
		continue
	res += abs(arr[i]) - 1
	if arr[i] >= 0:
		arr[i] = 1
	else:
		arr[i] = -1
if arr.count(-1) % 2 == 1:
	if arr.count(0) == 0:
		res += 2
	else:
		res += arr.count(0)
else:
	res += arr.count(0)
print(res)


def multiply(numbers):
	total = 1
	for x in numbers:
		total *= x
	return total
a = int(input())
b = [int(b) for b in input().split()]
r = 0
d = 0
while r < a:
	if b[r] < 0:
		c = -1 - b[r]
		d = d + c
		b[r] = -1
	elif b[r] == 0:
		d = d + 1
	else:
		c = b[r] - 1
		d = d + c
		b[r] = 1
	r = r + 1
if 0 not in b and b.count(-1) % 2 != 0:
	print(d + 2)
else:
	print(d)


input()
x = list(map(int, input().split()))
counter = 0
y = []
bool = 0
for i in x:
	if i < 0:
		y.append(i)
if 0 in x:
	for j in x:
		if j < 0:
			counter += -1 - j
		elif j == 0:
			counter += 1
		else:
			counter += j - 1
elif len(y) % 2 == 0:
	for j in x:
		if j < 0:
			counter += -1 - j
		else:
			counter += j - 1
else:
	for j in x:
		if j < 0 and bool == 0:
			counter += 1 - j
			bool = 1
		elif j < 0 and bool == 1:
			counter += -1 - j
		elif j > 0:
			counter += j - 1
		else:
			counter += 1
print(counter)


import math, itertools, fractions, heapq, collections, bisect, sys, queue, copy
sys.setrecursionlimit(10 ** 7)
inf = 10 ** 20
mod = 10 ** 9 + 7
dd = [(-1, 0), (0, 1), (1, 0), (0, -1)]
ddn = [(-1, 0), (-1, 1), (0, 1), (1, 1), (1, 0), (1, -1), (0, -1), (-1, -1)]

def LI():
	return [int(x) for x in sys.stdin.readline().split()]

def I():
	return int(sys.stdin.readline())

def F():
	return float(sys.stdin.readline())

def LS():
	return sys.stdin.readline().split()

def S():
	return input()

def main():
	n = I()
	l = LI()
	zero_cnt = 0
	minus_cnt = 0
	ans = 0
	for x in l:
		if x == 0:
			zero_cnt += 1
		elif x < 0:
			ans += -1 - x
			minus_cnt += 1
		else:
			ans += x - 1
	if minus_cnt % 2 == 1:
		if zero_cnt > 0:
			return ans + zero_cnt
		else:
			return ans + 2
	return ans + zero_cnt
print(main())


(l, a) = (int(input()), sorted(map(int, input().split())))
p = n = 0
for v in a:
	if v > 0:
		p += 1
n = l - p
if n % 2 == 1:
	n -= 1
	p += 1
b = [-1] * n + [1] * p
print(sum((abs(v - v1) for (v, v1) in zip(a, b))))


q = int(input())
w = list(map(int, input().split()))
e = 0
r = 0
t = 0
for i in w:
	if i < 0:
		e += -1 - i
		r += 1
	elif i > 0:
		e += i - 1
	else:
		e += 1
		t += 1
if r % 2 == 1:
	if t > 0:
		print(e)
	else:
		print(e + 2)
else:
	print(e)


n = eval(input())
l = list(map(eval, input().split()))
m_one = 0
zero = 0
ans = 0
for i in l:
	if i > 0:
		ans += i - 1
	elif i < 0:
		ans -= i + 1
		m_one += 1
	else:
		zero += 1
if m_one % 2 == 0:
	print(int(ans + zero))
elif zero > 0:
	print(int(ans + zero))
else:
	print(int(ans + 2))


n = int(input())
a = list(map(int, input().split()))
neg = 0
res = 0
zero = False
for v in a:
	if v == 0:
		(zero, res) = (True, res + 1)
	elif v < 0:
		(res, neg) = (res - v - 1, neg + 1)
	else:
		res += v - 1
if neg % 2 == 1 and (not zero):
	res += 2
print(res)


n = int(input())
l = list(map(int, input().split()))
c = 0
d = 0
e = 0
f = 0
for i in l:
	if i < 0:
		d += 1
		c += -1 - i
	elif i > 0:
		e += 1
		c += i - 1
	elif i == 0:
		f += 1
if d % 2 == 0:
	print(c + f)
elif d % 2 != 0:
	if f != 0:
		print(c + f)
	elif f == 0:
		print(c + 2)


import os
import sys
from io import BytesIO, IOBase

def solution(arr, n):
	(pos, neg) = (0, 0)
	res = 0
	for x in arr:
		if x < 0:
			if x != -1:
				res += abs(x) - 1
			neg += 1
		elif x > 0:
			if x != 1:
				res += x - 1
			pos += 1
	zeros = arr.count(0)
	if zeros > 0:
		res += zeros
	elif neg & 1:
		res += 2
	write(res)

def main():
	n = r_int()
	arr = r_array()
	solution(arr, n)
BUFSIZE = 8192

class FastIO(IOBase):
	newlines = 0

	def __init__(self, file):
		self._fd = file.fileno()
		self.buffer = BytesIO()
		self.writable = 'x' in file.mode or 'r' not in file.mode
		self.write = self.buffer.write if self.writable else None

	def read(self):
		while True:
			b = os.read(self._fd, max(os.fstat(self._fd).st_size, BUFSIZE))
			if not b:
				break
			ptr = self.buffer.tell()
			(self.buffer.seek(0, 2), self.buffer.write(b), self.buffer.seek(ptr))
		self.newlines = 0
		return self.buffer.read()

	def readline(self):
		while self.newlines == 0:
			b = os.read(self._fd, max(os.fstat(self._fd).st_size, BUFSIZE))
			self.newlines = b.count(b'\n') + (not b)
			ptr = self.buffer.tell()
			(self.buffer.seek(0, 2), self.buffer.write(b), self.buffer.seek(ptr))
		self.newlines -= 1
		return self.buffer.readline()

	def flush(self):
		if self.writable:
			os.write(self._fd, self.buffer.getvalue())
			(self.buffer.truncate(0), self.buffer.seek(0))

class IOWrapper(IOBase):

	def __init__(self, file):
		self.buffer = FastIO(file)
		self.flush = self.buffer.flush
		self.writable = self.buffer.writable
		self.write = lambda s: self.buffer.write(s.encode('ascii'))
		self.read = lambda : self.buffer.read().decode('ascii')
		self.readline = lambda : self.buffer.readline().decode('ascii')
(sys.stdin, sys.stdout) = (IOWrapper(sys.stdin), IOWrapper(sys.stdout))

def input():
	return sys.stdin.readline().rstrip('\r\n')

def write(*args, end='\n'):
	for x in args:
		sys.stdout.write(str(x) + ' ')
	sys.stdout.write(end)

def r_array():
	return [int(x) for x in input().split()]

def r_int():
	return int(input())

def w_array(arr):
	for x in arr:
		write(x, end=' ')
	write()
main()


n = int(input())
l = list(map(int, input().split()))
m = []
c = 0
for i in l:
	if i < 0:
		c += 1
	m.append(abs(i - 1))
if c % 2 == 0:
	m.append(2 * c * -1)
elif 0 in l:
	m.append(2 * c * -1)
else:
	x = c // 2 * 2
	m.append(-x * 2)
print(sum(m))


n = int(input())
a = 0
b = 0
c = 0
for i in map(int, input().split()):
	if i > 0:
		a += i - 1
	elif i < 0:
		a += -1 - i
		b += 1
	else:
		c += 1
print(a + c + 2 if b & 1 and c == 0 else a + c)


n = int(input())
x = list(map(int, input().split()))
ansar = 0
c0 = 0
c = 0
for i in range(len(x)):
	if x[i] > 0:
		c += abs(x[i] - 1)
	elif x[i] < 0:
		c += abs(x[i] + 1)
		ansar += 1
	else:
		c += 1
		c0 += 1
if ansar % 2 == 0:
	print(c)
elif ansar % 2 == 1 and c0 > 0:
	print(c)
else:
	print(c + 2)


n = int(input())
A = list(map(int, input().split()))
Neg = []
zero = 0
coin = 0
for i in A:
	if i < 0:
		Neg.append(i)
	elif i == 0:
		zero += 1
	else:
		coin += i - 1
N = len(Neg)
if N % 2 == 0:
	for i in Neg:
		coin += abs(i) - 1
	coin += zero
elif zero > 0:
	for i in Neg:
		coin += abs(i) - 1
	coin += zero
else:
	Neg.sort()
	L = Neg.pop(-1)
	for i in Neg:
		coin += abs(i) - 1
	coin += 1 - L
print(coin)


n = input()
num = list(map(int, input().split()))
neg = 0
ceros = 0
coins = 0
for i in num:
	if i == 0:
		ceros += 1
	elif i < 0:
		neg += 1
	coins += abs(abs(i) - 1)
if neg % 2 != 0:
	if ceros == 0:
		coins += 2
print(coins)


R = lambda : map(int, input().split())
n = int(input())
L = sorted(R())
(c1, c2, c0) = (0, 0, 0)
(r1, r2, r0) = (0, 0, 0)
for i in range(n):
	if L[i] < 0:
		c1 += 1
		r1 += abs(-1 - L[i])
	elif L[i] > 0:
		c2 += 1
		r2 += abs(1 - L[i])
	else:
		c0 += 1
		r0 += 1
if c1 % 2:
	if c0 > 0:
		print(r1 + r2 + r0)
	else:
		print(r1 + r2 + r0 + 2)
else:
	print(r1 + r2 + r0)


n = int(input())
arr = list(map(int, input().split()))
neg = 0
count = 0
zero = 0
for i in arr:
	if i < 0:
		neg += 1
	if i == 0:
		zero += 1
	count += abs(abs(i) - 1)
if neg % 2 != 0 and zero == 0:
	count += 2
print(count)


n = int(input())
seq = list(map(int, input().split()))
sum_ = 0
neg = 0
zero = 0
for num in seq:
	if num < 0:
		neg += 1
	if num == 0:
		sum_ += 1
		zero += 1
		continue
	sum_ += abs(num) - 1
if neg % 2 == 0 or zero > 0:
	print(sum_)
else:
	print(sum_ + 2)


N = int(input())
A = list(map(int, input().split()))
zflag = False
ans = 0
cnt = 1
for a in A:
	if a == 0:
		zflag = True
		ans += 1
	elif a < 0:
		cnt *= -1
		ans += abs(-1 - a)
	else:
		ans += abs(1 - a)
if not zflag and cnt == -1:
	ans += 2
print(ans)


n = int(input())
a = list(map(int, input().split()))
a.sort()
ans = 0
i = 0
while i + 1 < len(a):
	closeToMinusOne = abs(a[i] + 1) <= abs(a[i] - 1) and abs(a[i + 1] + 1) <= abs(a[i + 1] - 1)
	if closeToMinusOne:
		ans += abs(a[i] + 1) + abs(a[i + 1] + 1)
	else:
		ans += abs(a[i] - 1) + abs(a[i + 1] - 1)
	i += 2
if i < len(a):
	ans += abs(a[i] - 1)
print(ans)


n = int(input())
arr = list(map(int, input().strip().split()))
greater1 = 0
less1 = 0
zero = 0
res = 0
for i in arr:
	if i >= 1:
		greater1 += 1
		res = res + i - 1
	elif i <= -1:
		res = res + -1 * i - 1
		less1 += 1
	else:
		zero += 1
res += zero
if zero == 0 and less1 % 2 != 0:
	res += 2
print(res)


n = int(input())
l = list(map(int, input().split()))
s = 0
nl = 0
l1 = []
l2 = []
for i in range(n):
	if l[i] <= 0:
		nl += 1
		l1.append(l[i])
	else:
		l2.append(l[i])
m = len(l2)
for i in range(m):
	s = s + (l2[i] - 1)
if (n - m) % 2 == 1:
	ind = l1.index(max(l1))
	for i in range(n - m):
		if i == ind:
			s += 1 - l1[i]
		else:
			s += abs(-1 - l1[i])
else:
	for i in range(n - m):
		s += abs(-1 - l1[i])
print(s)


n = int(input())
a = list(map(int, input().split()))
nat = list(filter(lambda x: x > 1, a))
zero = a.count(0)
otr = list(filter(lambda x: x < -1, a))
minus = a.count(-1)
if zero > 0:
	print(zero + sum(nat) - len(nat) + sum(otr) * -1 - len(otr))
elif (len(otr) + minus) % 2 == 0:
	print(sum(nat) - len(nat) + sum(otr) * -1 - len(otr))
else:
	print(sum(nat) - len(nat) + sum(otr) * -1 - len(otr) + 2)


import sys, math
input = sys.stdin.readline

def inp():
	return int(input())

def inlt():
	return list(map(int, input().split()))

def insr():
	s = input()
	return list(s[:len(s) - 1])

def invr():
	return map(int, input().split())
t = 1
for tt in range(t):
	n = inp()
	a = inlt()
	c = 0
	q = 0
	w = 0
	for i in range(len(a)):
		c = c + min(abs(a[i] - 1), abs(a[i] + 1))
		if abs(a[i] - 1) > abs(a[i] + 1):
			q = q + 1
		else:
			w = w + 1
	if q % 2 == 0:
		print(c)
	elif 0 in a:
		print(c)
	else:
		print(c + 2)


import sys
n = int(sys.stdin.readline())
arr = list(map(int, sys.stdin.readline().split()))
(negs, poss, zeros) = (0, 0, 0)
coins_req = 0
for i in range(n):
	if arr[i] < 0:
		negs += 1
		coins_req += -1 - arr[i]
		arr[i] = -1
	elif arr[i] > 0:
		poss += 1
		coins_req += arr[i] - 1
	else:
		zeros += 1
if negs & 1:
	if zeros:
		zeros -= 1
		negs -= 1
		coins_req += 1
	else:
		negs -= 1
		coins_req += 2
if zeros:
	coins_req += zeros
print(coins_req)


def hasZero(arr):
	for x in arr:
		if x == 0:
			return True
	return False

def countNegatives(arr):
	count = 0
	for x in arr:
		count += 1 if x < 0 else 0
	return count

def countMinSteps(arr):
	minSteps = 0
	for x in arr:
		minSteps += abs(abs(x) - 1)
	return minSteps

def main():
	ammount = int(input())
	numbers = [int(x) for x in input().split()]
	negCount = countNegatives(numbers)
	steps = countMinSteps(numbers)
	hasZ = hasZero(numbers)
	if negCount % 2 != 0 and (not hasZ):
		print(steps + 2)
	else:
		print(steps)
main()


n = int(input())
a = [int(i) for i in input().split()]
k = 0
d = True
nulls = 0
for i in a:
	if i > 0:
		k += i - 1
	elif i < 0:
		k += -i - 1
		d = not d
	elif i == 0:
		nulls += 1
if d:
	k += nulls
elif nulls == 0:
	k += 2
else:
	k += nulls
print(k)


n = int(input())
arr = list(map(int, input().split()))
summ = 0
count = 0
for i in arr:
	if abs(i - 1) > abs(i + 1):
		summ += abs(i + 1)
		count += 1
	else:
		summ += abs(i - 1)
if 0 not in arr:
	if count % 2 == 0:
		pass
	else:
		summ += 2
print(summ)


n = int(input())
A = list(map(int, input().split()))
(cost, neg, ze) = (0, 0, 0)
for i in range(n):
	if A[i] < 0:
		neg += 1
		cost += -1 - A[i]
	elif A[i] == 0:
		ze += 1
		cost += 1
	else:
		cost += A[i] - 1
if neg % 2 == 0 or ze > 0:
	print(cost)
else:
	print(cost + 2)


n = int(input())
a = list(map(int, input().split()))
zeros = minus = 0
cost = 0
for x in a:
	if x <= -1:
		minus += 1
		cost += -x - 1
	elif x == 0:
		zeros += 1
	else:
		cost += x - 1
cost += zeros
if zeros == 0:
	if minus % 2 == 1:
		cost += 2
print(cost)


import sys
import os
from io import IOBase, BytesIO

def main():
	n = int(input())
	arr = get_array()
	ans = 0
	d = {0: 0, 1: 0, -1: 0}
	for i in range(n):
		if arr[i] == 0:
			d[0] += 1
		elif arr[i] > 0:
			ans += arr[i] - 1
			d[1] += 1
		else:
			ans += abs(arr[i] + 1)
			d[-1] += 1
	if d[0] == 0:
		if d[-1] % 2 == 0:
			print(ans)
			return
		else:
			print(ans + 2)
			return
	else:
		print(ans + d[0])
BUFSIZE = 8192

class FastIO(BytesIO):
	newlines = 0

	def __init__(self, file):
		self._file = file
		self._fd = file.fileno()
		self.writable = 'x' in file.mode or 'w' in file.mode
		self.write = super(FastIO, self).write if self.writable else None

	def _fill(self):
		s = os.read(self._fd, max(os.fstat(self._fd).st_size, BUFSIZE))
		self.seek((self.tell(), self.seek(0, 2), super(FastIO, self).write(s))[0])
		return s

	def read(self):
		while self._fill():
			pass
		return super(FastIO, self).read()

	def readline(self):
		while self.newlines == 0:
			s = self._fill()
			self.newlines = s.count(b'\n') + (not s)
		self.newlines -= 1
		return super(FastIO, self).readline()

	def flush(self):
		if self.writable:
			os.write(self._fd, self.getvalue())
			(self.truncate(0), self.seek(0))

class IOWrapper(IOBase):

	def __init__(self, file):
		py2 = round(0.5)
		self.buffer = FastIO(file)
		self.flush = self.buffer.flush
		self.writable = self.buffer.writable
		if py2 == 1:
			self.write = self.buffer.write
			self.read = self.buffer.read
			self.readline = self.buffer.readline
		else:
			self.write = lambda s: self.buffer.write(s.encode('ascii'))
			self.read = lambda : self.buffer.read().decode('ascii')
			self.readline = lambda : self.buffer.readline().decode('ascii')
(sys.stdin, sys.stdout) = (IOWrapper(sys.stdin), IOWrapper(sys.stdout))

def get_array():
	return list(map(int, sys.stdin.readline().split()))

def get_ints():
	return map(int, sys.stdin.readline().split())

def input():
	return sys.stdin.readline().strip()
main()


n = int(input())
l = list(map(int, input().split()))
(cn, t) = (0, 0)
s = []
p = -1
m = 0
z = 0
for i in range(0, n):
	if l[i] == 0:
		z += 1
		t += 1
	elif l[i] > 0:
		t += l[i] - 1
	else:
		cn += 1
		s.append(l[i])
		if m == 0:
			m = l[i]
			p = cn - 1
			continue
		if m < l[i]:
			m = l[i]
			p = cn - 1
if z != 0 and cn % 2 != 0:
	cn += 1
if cn % 2 != 0:
	t += abs(m) + 1
	s[p] = 0
for j in s:
	if j != 0:
		t += abs(j) - 1
print(t)


n = int(input())
A = list(map(int, input().rstrip().split()))
even = 1
zero = 0
count = 0
for a in A:
	if a < 0:
		count += -1 - a
		if even == 1:
			even = 0
		else:
			even = 1
	if a > 0:
		count += a - 1
	if a == 0:
		zero = 1
		count += 1
if even == 0:
	if zero != 1:
		count += 2
print(count)


n = int(input())
arr = list(map(int, input().split()))
coin = 0
for i in range(n):
	if arr[i] < -1:
		coin += abs(arr[i]) - 1
		arr[i] = -1
	elif arr[i] > 1:
		coin += arr[i] - 1
		arr[i] = 1
coutMinus = arr.count(-1)
countZero = arr.count(0)
if coutMinus % 2 == 1 and countZero == 0:
	print(coin + 2)
else:
	print(coin + countZero)


n = int(input())
a = list(map(int, input().split()))
neg = 0
neg = sum((1 for i in a if i < 0))
count = 0
z = a.count(0)
if neg % 2 != 0 and z == 0:
	count = 2
for i in range(n):
	if a[i] < 0:
		count = count + abs(1 + a[i])
	if a[i] > 0:
		count = count + abs(1 - a[i])
	if a[i] == 0:
		count = count + 1
print(count)


n = int(input())
lista = list(map(int, input().split()))
count = 0
negn = 0
zeron = 0
for i in lista:
	count += abs(abs(i) - 1)
	if i < 0:
		negn += 1
	if i == 0:
		zeron += 1
if negn % 2 == 0:
	print(count)
elif zeron:
	print(count)
else:
	print(count + 2)


input()
ans = 0
extra = 0
for a in input().split():
	if a == '0':
		ans += 1
		extra = 1
	else:
		if a.startswith('-'):
			extra = 2 - extra
			a = a.lstrip('-')
		ans += int(a) - 1
if extra == 2:
	ans += 2
print(ans)


n = int(input())
a = map(int, input().split())
(move_count, count_gtz, count_ltz, count_zero) = (0, 0, 0, 0)
for i in a:
	if i == 0:
		count_zero += 1
	elif i > 0:
		count_gtz += 1
		move_count += i - 1
	else:
		count_ltz += 1
		move_count += abs(i - -1)
if count_ltz % 2 == 0:
	move_count += count_zero
elif count_zero > 0:
	move_count += count_zero
else:
	move_count += 2
print(move_count)


n = int(input())
a = list(map(int, input().split()))
c = 0
i = 0
while i < n:
	if a[i] > 1:
		c = c + (a[i] - 1)
		a[i] = 1
	elif a[i] < -1:
		c = c + (-1 - a[i])
		a[i] = -1
	elif a[i] == 0:
		a[i] = 0
		c = c + 1
	i = i + 1
if a.count(-1) % 2 == 0:
	print(c)
else:
	p = 0
	if p in a:
		print(c)
	else:
		print(c + 2)


from collections import defaultdict, Counter
import copy, math
from copy import deepcopy
n = int(input())
l = list(map(int, input().split()))
s = 0
j = 0
neg = 0
for i in l:
	if i < 0:
		s += abs(-1 - i)
		neg += 1
	elif i == 0:
		j += 1
		s += 1
	else:
		s += abs(i - 1)
if neg % 2 == 1 and j == 0:
	print(s + 2)
else:
	print(s)


import sys
import math
from collections import defaultdict
from collections import Counter
n = int(input())
a = list(map(int, input().split()))
c = 0
c1 = 0
s = 0
for i in range(n):
	if a[i] < 0:
		c += 1
		s += abs(a[i]) - 1
	if a[i] > 0:
		s += a[i] - 1
	if a[i] == 0:
		c1 += 1
		s += 1
if c % 2 != 0 and c1 == 0:
	s += 2
print(s)


input()
z = 0
c = 0
r = 1
for e in list((int(a) for a in input().split())):
	if e == 0:
		z += 1
	elif e > 0:
		c += e - 1
	else:
		c += -1 - e
		r *= -1
if r == -1:
	if z == 0:
		c += 2
print(c + z)


n = int(input())
a = list(map(int, input().split()))
k = 0
d = 0
f = 0
for i in range(n):
	if a[i] <= -1:
		d += -1 - a[i]
		k += 1
	elif a[i] == 0:
		d += 1
		f += 1
	else:
		d += a[i] - 1
if k % 2 != 0 and f == 0:
	d += 2
print(d)


n = int(input())
a = [int(x) for x in input().split()]
c = 0
c0 = 0
res = 0
for i in a:
	if i != 0:
		res += abs(i - (-1 if i < 0 else 1))
		c += 1 if i < 0 else 0
for i in a:
	if i == 0:
		c0 += 1
print(res + (c % 2 * 2 if c0 == 0 else c0))


import math

def coins(n, arr):
	count = 0
	even = 0
	zero = 0
	for num in arr:
		if num < 0:
			count += int(math.fabs(num + 1))
			even += 1
		elif num == 0:
			zero += 1
		else:
			count += num - 1
	if (even + zero) % 2 == 0:
		print(count + zero)
	elif zero == 0:
		print(count + 2)
	else:
		print(count + zero)
n = int(input())
arr = list(map(int, input().split()))
coins(n, arr)


n = int(input())
arr = list(map(int, input().split()))
countnegative = 0
countzero = 0
cost = 0
for i in range(n):
	if arr[i] > 0:
		cost += arr[i] - 1
	elif arr[i] < 0:
		countnegative += 1
		cost += abs(arr[i]) - 1
	else:
		countzero += 1
if countzero > 0:
	cost += countzero
elif countnegative % 2 != 0:
	cost += 2
print(cost)


n = int(input())
arr = list(map(int, input().split()))
cn = 0
ans = 0
nz = 0
for item in arr:
	if item == 0:
		nz += 1
	if item < 0:
		ans += -1 - item
		cn += 1
	if item > 0:
		ans += item - 1
if cn % 2 == 0:
	print(ans + nz)
elif nz > 0:
	print(ans + nz)
else:
	print(ans + 2)


n = int(input())
a = list(map(int, input().split()))
zero = a.count(0)
cnt = 0
n = tuple(filter(lambda x: x < 0, a))
for i in range(len(a)):
	if a[i] != 1 and a[i] != -1:
		cnt += abs(abs(a[i]) - 1)
if zero == 0 and len(n) % 2 != 0:
	cnt += 2
print(cnt)


import math
n = int(input())
a = [int(s) for s in input().split()]
co = 0
man = 0
flag = True
for i in range(n):
	if a[i] < 0:
		co += 1
	if a[i] == 0:
		flag = False
	man += math.fabs(math.fabs(a[i]) - 1)
man = int(man)
if co % 2 == 0:
	print(man)
elif flag and co % 2 == 1:
	print(man + 2)
elif not flag and co % 2 == 1:
	print(man)


input()
(k, neg, ze) = (0, 0, 0)
p = list(map(int, input().split()))
for i in p:
	k += abs(abs(i) - 1)
	if i < 0:
		neg += 1
	elif i == 0:
		ze += 1
print(k if neg % 2 == 0 else k + 2 if ze == 0 else k)


q = int(input())
l = list(map(int, input().split(' ')))
n = 0
m = 0
l.sort()
for i in l:
	if i < 0:
		m += -1 - i
		n += 1
	elif i == 0:
		m += 1
		if n % 2 != 0:
			n += 1
	else:
		m += i - 1
if n % 2 != 0:
	print(m + 2)
else:
	print(m)


n = int(input())
nums = list(map(int, input().split()))
num_negatives = num_positives = num_zeroes = 0
coins = 0
for num in nums:
	if num == 0:
		num_zeroes += 1
		coins += 1
	elif num < 0:
		num_negatives += 1
		coins += abs(num + 1)
	else:
		num_positives += 1
		coins += num - 1
if num_negatives % 2 != 0:
	if num_zeroes < 1:
		coins += 2
	print(coins)
else:
	print(coins)


n = int(input())
numbers = [int(i) for i in input().split(' ')]

def calculate_cost(e):
	if e > 0:
		return e - 1
	elif e < 0:
		return abs(e + 1)
	else:
		return 1
cost = sum([calculate_cost(i) for i in numbers])
test_works = sum([1 for i in numbers if i < 0])
if test_works % 2 != 0 and (not 0 in numbers):
	cost += 2
print(cost)


n = int(input())
a = list(map(int, input().split()))
a = sorted(a)
ans = 0
cnt = 0
rmin = max(a)
for x in a:
	if abs(x + 1) < abs(x - 1):
		ans += abs(x + 1)
		cnt += 1
	else:
		ans += abs(x - 1)
		rmin = x if rmin is None else min(rmin, x)
if cnt % 2 == 1:
	if rmin >= 1 or rmin <= -1:
		ans += 2
print(ans)


n = int(input())
a = list(map(int, input().split()))
m = 0
z = 0
c = 0
for i in range(n):
	if a[i] < 0:
		m += 1
	if a[i] == 0:
		z += 1
if m > 0:
	if m % 2 == 0:
		for i in range(n):
			if a[i] < 0:
				c += -1 * a[i] - 1
				a[i] = 1
	elif z > 0:
		for i in range(n):
			if a[i] == 0:
				a[i] = 2
				break
		for i in range(n):
			if a[i] < 0:
				c += -1 * a[i] - 1
				a[i] = 1
	else:
		for i in range(n):
			if a[i] < 0:
				c += -1 * a[i] - 1
				if m > 1:
					a[i] = 1
				else:
					a[i] = 3
				m -= 1
for i in range(n):
	if a[i] > 0:
		c += a[i] - 1
	else:
		c += 1
print(c)


n = int(input())
a = [int(x) for x in input().split()]
pocet_minusiek = 0
out = 0
mam_nulu = False
for i in range(n):
	if a[i] > 0:
		out = out + a[i] - 1
	elif a[i] < 0:
		out = out - a[i] - 1
		pocet_minusiek += 1
	else:
		mam_nulu = True
		out += 1
if pocet_minusiek % 2 == 0:
	print(out)
elif mam_nulu:
	print(out)
else:
	print(out + 2)


n = int(input())
a = list(map(int, input().split()))
ans = 0
zero = 0
nega = 0
for i in range(n):
	if a[i] == 0:
		zero += 1
	elif a[i] < 0:
		nega += 1
		ans += -1 - a[i]
	else:
		ans += a[i] - 1
if nega % 2 == 1:
	if zero > 0:
		zero -= 1
		ans += 1
	else:
		ans += 2
ans += zero
print(ans)


from collections import deque
from collections import OrderedDict
import math
import sys
import os
import threading
import bisect
import operator
import heapq
from atexit import register
from io import BytesIO
import io
input = lambda : sys.stdin.readline().rstrip('\r\n')

def fun1(i, k):
	if i <= k:
		return i
	else:
		return k - (i - k)
n = int(input())
ar = list(map(int, input().split()))
answer = 0
isZero = 0
for i in range(n):
	if ar[i] > 0:
		answer += ar[i] - 1
		ar[i] = 1
	elif ar[i] < 0:
		answer += abs(ar[i]) - 1
		ar[i] = -1
	else:
		answer += 1
		ar[i] = 1
		isZero = 1
pAll = 1
for i in range(n):
	pAll *= ar[i]
if pAll == 1:
	print(answer)
else:
	if isZero != 1:
		answer += 2
	print(answer)
sys.exit(0)
for t in range(int(input())):
	n = int(input())
	ar1 = [' '] + list(map(str, input().split()))
	ar2 = [' '] + list(map(str, input().split()))
	dp = [[0] * (n + 1) for i in range(n + 1)]
	for i in range(1, n + 1):
		for j in range(1, n + 1):
			dp[i][j] = dp[i - 1][j]
			if ar1[i] == ar2[j]:
				dp[i][j] = dp[i - 1][j - 1] + 1
			else:
				dp[i][j] = max(dp[i][j - 1], dp[i - 1][j])


n = int(input())
a = [int(i) for i in input().split(' ')]
r = 0
neg = 0
ze = 0
for i in range(n):
	if a[i] == 0:
		r = r + 1
		ze = 1
	elif a[i] < 0:
		r = r - a[i] - 1
		neg = neg + 1
	else:
		r = r + a[i] - 1
if neg % 2 == 1 and ze == 0:
	print(r + 2)
else:
	print(r)


n = int(input())
li = list(map(int, input().split()))
ans = 0
ne = 0
z = 0
po = 0
for i in li:
	if i <= -1:
		ans += -1 - i
		ne += 1
	elif i >= 1:
		po += 1
		ans += i - 1
	else:
		z += 1
		ans += 1
if ne % 2 == 1 and z == 0:
	ans += 2
print(ans)


import sys, os, re, datetime
from collections import *
from bisect import *

def mat(v, *dims):

	def submat(i):
		if i == len(dims) - 1:
			return [v for _ in range(dims[-1])]
		return [submat(i + 1) for _ in range(dims[i])]
	return submat(0)
__cin__ = None

def cin():
	global __cin__
	if __cin__ is None:
		__cin__ = iter(input().split(' '))
	try:
		return next(__cin__)
	except StopIteration:
		__cin__ = iter(input().split(' '))
		return next(__cin__)

def iarr(n):
	return [int(cin()) for _ in range(n)]

def farr(n):
	return [float(cin()) for _ in range(n)]

def sarr(n):
	return [cin() for _ in range(n)]

def carr(n):
	return input()

def imat(n, m):
	return [iarr(m) for _ in range(n)]

def fmat(n, m):
	return [farr(m) for _ in range(n)]

def smat(n, m):
	return [sarr(m) for _ in range(n)]

def cmat(n, m):
	return [input() for _ in range(n)]
n = int(cin())
a = iarr(n)
z = 0
ans = 0
s = 1
for i in range(n):
	if a[i] == 0:
		z += 1
	else:
		ans += abs(a[i]) - 1
		if a[i] < 0:
			if s == 1:
				s = -1
			else:
				s = 1
if s == -1 and z == 0:
	ans += 2
else:
	ans += 1
	ans += z - 1
print(ans)


n = int(input())
arr = list(map(int, input().split()))
move = 0
cnt = 0
pcnt = 0
ncnt = 0
for i in range(n):
	if arr[i] > 0:
		move += arr[i] - 1
		arr[i] = 1
		pcnt += 1
	elif arr[i] < 0:
		move += -1 - arr[i]
		arr[i] = -1
		ncnt += 1
	else:
		cnt += 1
if pcnt + ncnt == n:
	if ncnt % 2 == 0:
		print(move)
	else:
		print(move + 2)
elif ncnt % 2 == 0:
	print(move + cnt)
else:
	print(move + cnt)


import math

def main():
	n = input()
	ns = [int(x) for x in input().split(' ')]
	res = 0
	neg = 0
	has_zero = False
	for x in ns:
		if x > 0:
			res += x - 1
		elif x < 0:
			res += -1 - x
			neg += 1
		else:
			res += 1
			has_zero = True
	if has_zero:
		print(res)
	elif neg % 2 == 0:
		print(res)
	else:
		print(res + 2)
main()


n = int(input())
cost = 0
zeroes = 0
neg = False
for num in input().split():
	num = int(num)
	if num == 0:
		zeroes += 1
	elif num <= -1:
		cost += -1 - num
		neg = not neg
	elif num > 1:
		cost += num - 1
if zeroes != 0:
	cost += zeroes
elif neg == True:
	cost += 2
print(cost)


import math
N = int(input())
A = input().split(' ')
input = []
for i in range(0, N):
	input.append(int(A[i]))
posMin = []
negMin = []
posMin.append(int(math.fabs(input[0] - 1)))
negMin.append(int(math.fabs(input[0] + 1)))
for i in range(1, N):
	posTemp = min(posMin[i - 1] + math.fabs(input[i] - 1), negMin[i - 1] + math.fabs(input[i] + 1))
	negTemp = min(negMin[i - 1] + math.fabs(input[i] - 1), posMin[i - 1] + math.fabs(input[i] + 1))
	posMin.append(posTemp)
	negMin.append(negTemp)
print(int(posMin[N - 1]))


n = int(input())
array = list(map(int, input().split()))
total = 0
minus = 0
zero = 0
for i in range(len(array)):
	if array[i] > 0:
		total += array[i] - 1
	elif array[i] < 0:
		minus += 1
		total += -1 - array[i]
	else:
		zero += 1
		total += 1
if minus % 2 and zero == 0:
	total += 2
print(total)