def main():

    _ = int(eval(input()))

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

    cnt_minus = 0

    zero_flag = False

    for i, a in enumerate(A):

        if a < 0:

            cnt_minus += 1

        elif a == 0:

            zero_flag = True



    ans = 0

    if cnt_minus % 2 == 0 or zero_flag:

        ans = sum(abs(a) for a in A)

    else:

        ans = sum(abs(a) for a in A) - min(abs(a) for a in A) * 2

    print(ans)





if __name__ == '__main__':

    main()

def main():

    import sys

    input = sys.stdin.buffer.readline

    _ = int(eval(input()))

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

    sumA = sum(abs(a) for a in A)

    mi = len([a for a in A if a < 0])

    if 0 in A or mi % 2 == 0:

        print(sumA)

    else:

        print((sumA - 2*min(abs(a) for a in A)))





if __name__ == '__main__':

    main()

def main():
    _ = int(eval(input()))
    A = [int(i) for i in input().split()]
    cnt_minus = 0
    zero_flag = False
    for i, a in enumerate(A):
        if a < 0:
            cnt_minus += 1
        elif a == 0:
            zero_flag = True
    ans = 0
    if cnt_minus % 2 == 0 or zero_flag:
        ans = sum(abs(a) for a in A)
    else:
        ans = sum(abs(a) for a in A) - min(abs(a) for a in A) * 2
    print(ans)


if __name__ == "__main__":
    main()

def main():
    import sys

    input = sys.stdin.buffer.readline
    _ = int(eval(input()))
    A = [int(i) for i in input().split()]
    sumA = sum(abs(a) for a in A)
    mi = len([a for a in A if a < 0])
    if 0 in A or mi % 2 == 0:
        print(sumA)
    else:
        print((sumA - 2 * min(abs(a) for a in A)))


if __name__ == "__main__":
    main()

+    import sys + +    input = sys.stdin.buffer.readline -    cnt_minus = 0 -    zero_flag = False -    for i, a in enumerate(A): -        if a < 0: -            cnt_minus += 1 -        elif a == 0: -            zero_flag = True -    ans = 0 -    if cnt_minus % 2 == 0 or zero_flag: -        ans = sum(abs(a) for a in A) +    sumA = sum(abs(a) for a in A) +    mi = len([a for a in A if a < 0]) +    if 0 in A or mi % 2 == 0: +        print(sumA) -        ans = sum(abs(a) for a in A) - min(abs(a) for a in A) * 2 -    print(ans) +        print((sumA - 2 * min(abs(a) for a in A)))