program flipping_signs
  implicit none
  integer :: n, i, k
  integer(8) :: a(100000), m
  a = 0_8
  read(*,*) n
  read(*,*) a(1:n)
  m = 10000000000_8
  k = 0
  do i = 1, n
    if (m.gt.abs(a(i))) m = abs(a(i))
    if (a(i).lt.0_8) k = k + 1
  end do
  if (mod(k,2).eq.0) then
    m = sum(abs(a(1:n)))
  else
    m = sum(abs(a(1:n))) - m
  end if
  write(*,'(i0)') m
  stop
end program flipping_signs