program main
  implicit none
  integer :: n, i, cnt = 0
  integer(8), allocatable :: a(:)

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

  do i = 1, n
    if (a(i) < 0) then
      cnt = cnt + 1
      a(i) = -a(i)
    end if
  end do
  if (mod(cnt, 2) == 0) then
    print '(i0)', sum(a)
  else
    print '(i0)', sum(a) - 2 * minval(a)
  end if
end program