program main
implicit none
 
integer(8) :: n,i,ans,minus=0
integer(8), 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
	ans = sum(abs(a))
else 
	ans = sum(abs(a))
    ans = ans - 2*minval(abs(a))
end if
write(*,'(I0)')ans

end program