program main
implicit none

integer :: n,i,ans,minus
integer, allocatable :: a(:)
read(*,*)n
allocate(a(n))
read(*,*)a(1:n)

do i=1,n
	if (a(i) < 0) then
    	minus = minus +1
    end if
end do
ans = 0
if (mod(minus,2) == 0) then
	do i=1,n
    	ans = ans + abs(a(i))
    end do
else 
	do i=1,n
    	ans = ans + abs(a(i))
    end do
    ans = ans - 2*minval(abs(a))
end if
write(*,*)ans

end program