program main
    integer(8):: n,i,c_m
    integer(8),allocatable:: a(:)

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

    c_m = 0
    do i=1,n
        if (a(i) < 0) c_m=c_m+1
    end do

    if (mod(c_m,2_8) == 0) then
        print*, sum(abs(a(:)))
    else
        print*, sum(abs(a(:))) - 2*minval(abs(a(:)))
    end if
end program
