n = input()
c = map(int, raw_input().split())
c = sorted(c)
p = 2
np = 1
diff_p = 0
diff_np = 0
for x in range(0, len(c), +1):
    diff_p += abs(c[x]-p)
    p += 2
    diff_np += abs(c[x]-np)
    np += 2
if diff_p <= diff_np:
    print diff_p
else:
    print diff_np