def main():

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

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

    *ab, = [abs(x) for x in a]

    c, d = sum(a), sum(b)

    if len(b) % 2 == 0:

        print((c - 2 * d))

    else:

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





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():
    n, *a = list(map(int, open(0).read().split()))
    b = [i for i in a if i <= 0]
    (*ab,) = [abs(x) for x in a]
    c, d = sum(a), sum(b)
    if len(b) % 2 == 0:
        print((c - 2 * d))
    else:
        print((c - 2 * d - 2 * min(ab)))


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()

-    (*ab,) = [abs(x) for x in a] -    c, d = sum(a), sum(b) +    (*ab,) = list(map(abs, a)) +    c = sum(ab) -        print((c - 2 * d)) +        print(c) -        print((c - 2 * d - 2 * min(ab))) +        print((c - 2 * min(ab)))