program name
    implicit none
    integer(8):: n, i, cnt
    integer(8),allocatable:: a(:)

    read*, n
    allocate(a(n))
    read*, a(:)

    cnt = 0
    do i=1,n
        if (a(i) < 0) then
            cnt=cnt+1
            a(i) = -a(i)
        end if
    end do


    if (mod(cnt,2_8) == 0_8) then
        print*, sum(a)
    else
        print*, sum(a) - 2*minval(a)
    end if
end program name