program main
  implicit none
  integer i, N
  integer(8) A(10**5), A_abs(10**5), ans
  integer n_minus, min_zettaichi
  
  read(*, *) N
  read(*, *) (A(i), i=1,N)
  n_minus = 0 !0,minusが0,2,4   1,minusが1,3,5
  min_zettaichi = abs(A(1))

  A_abs = abs(A)
  
  do i = 1,N
    if (abs(A(i)) < min_zettaichi) then
      min_zettaichi = abs(A(i))
    end if
    if (A(i) < 0) then
      n_minus = 1-n_minus
    end if
  end do

  ans = sum(A_abs) - 2*n_minus*min_zettaichi
  
  write(* ,'(i0)') ans
end program main
