def main():

    n, *a = list(map(int, open(0).read().split()))

    b = [i for i in a if i <= 0]

    *ab, = list(map(abs, a))

    c = sum(ab)

    if len(b) % 2 == 0:

        print(c)

    else:

        print((c - 2 * min(ab)))





if __name__ == '__main__':

    main()

def main():

    s = open(0).read()

    b = s.count('-')

    _, *c, = list(map(int, s.replace('-', '').split()))

    z = c.count(0)

    d = min(c)

    e = sum(c)



    if b % 2 == 0 or z > 0:

        print(e)

    else:

        print((e - 2 * d))





if __name__ == '__main__':

    main()

def main():
    n, *a = list(map(int, open(0).read().split()))
    b = [i for i in a if i <= 0]
    (*ab,) = list(map(abs, a))
    c = sum(ab)
    if len(b) % 2 == 0:
        print(c)
    else:
        print((c - 2 * min(ab)))


if __name__ == "__main__":
    main()

def main():
    s = open(0).read()
    b = s.count("-")
    (
        _,
        *c,
    ) = list(map(int, s.replace("-", "").split()))
    z = c.count(0)
    d = min(c)
    e = sum(c)
    if b % 2 == 0 or z > 0:
        print(e)
    else:
        print((e - 2 * d))


if __name__ == "__main__":
    main()

-    n, *a = list(map(int, open(0).read().split())) -    b = [i for i in a if i <= 0] -    (*ab,) = list(map(abs, a)) -    c = sum(ab) -    if len(b) % 2 == 0: -        print(c) +    s = open(0).read() +    b = s.count("-") +    ( +        _, +        *c, +    ) = list(map(int, s.replace("-", "").split())) +    z = c.count(0) +    d = min(c) +    e = sum(c) +    if b % 2 == 0 or z > 0: +        print(e) -        print((c - 2 * min(ab))) +        print((e - 2 * d))