integer(16) n
integer(16),allocatable,dimension(:)::a
integer check
integer zero
read*,N
allocate(a(N))
read*,a
check=2
zero=1
do i=1,N
  if(a(i)==0)zero=0
  if(a(i)<0)then
    check=check+1
    a(i)=-a(i)
  end if
end do
print"(I0)",sum(a)-2*minval(a)*zero*merge(0,1,mod(check,2)==0)
end