

def abss(x):
    return x if x > 0 else -x


def chess(current):
    current = sorted(current)
    sum1 = 0
    for i in range(1, len(current) + 1):
        sum1 += abss(current[i-1] - i*2 + 1)

    sum2 = 0
    for i in range(1, len(current) + 1):
        sum2 += abss(current[i-1] - i*2)

    return min(sum1, sum2)


n = int(raw_input())
print(chess([int(x) for x in raw_input().split(' ')]))
