PROGRAM ATCODER

implicit none
integer(16) :: n,i,count=0,min=10**9,ans=0
integer(16),allocatable :: a(:)

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

do i = 1, n, 1
  if ( a(i) < 0 ) then
    count = count + 1
  end if
  call chmin(min,abs(a(i)))
  ans = ans + abs(a(i))
end do

if ( mod(count,2) == 0 ) then
  print'(i0)', ans
else
  print'(i0)', ans - 2*min
end if


contains
  
  subroutine chmin(dp,x)
    
  implicit none
  integer(16) :: dp, x

  if (dp > x) then
  	dp = x
  	return
  end if

  end subroutine

END PROGRAM ATCODER