

# coding: utf-8



# In[20]:



import sys

#input = sys.stdin.readline

N = int(eval(input()))

A = list(map(int, input().split()))





# In[21]:



import numpy as np

A.sort(key=lambda x:abs(x))

#print(N, A)





# In[25]:



A = np.array(A)

#print(sum(A<0))

if sum(A<0)%2 == 0:

    print((sum(abs(A))))

else:

    print((sum(abs(A[1:])) - abs(A[0])))





# In[ ]:









# coding: utf-8



# In[28]:



import sys

#input = sys.stdin.readline

N = int(eval(input()))

A = list(map(int, input().split()))





# In[21]:



#import numpy as np

#A.sort(key=lambda x:abs(x))

#print(N, A)





# In[25]:



#A = np.array(A)

#print(sum(A<0))

#if sum(A<0)%2 == 0:

#    print(sum(abs(A)))

#else:

#    print(sum(abs(A[1:])) - abs(A[0]))





# In[29]:



B = list(map(abs, A))

C = [a for a in A if a < 0]

#print(A)

#print(B)

#print(C)





# In[30]:



if len(C)%2 ==0:

    print((sum(B)))

else:

    print((sum(B) - min(B)*2))





# In[ ]:







# coding: utf-8
# In[20]:
import sys

# input = sys.stdin.readline
N = int(eval(input()))
A = list(map(int, input().split()))
# In[21]:
import numpy as np

A.sort(key=lambda x: abs(x))
# print(N, A)
# In[25]:
A = np.array(A)
# print(sum(A<0))
if sum(A < 0) % 2 == 0:
    print((sum(abs(A))))
else:
    print((sum(abs(A[1:])) - abs(A[0])))
# In[ ]:

# coding: utf-8
# In[28]:
import sys

# input = sys.stdin.readline
N = int(eval(input()))
A = list(map(int, input().split()))
# In[21]:
# import numpy as np
# A.sort(key=lambda x:abs(x))
# print(N, A)
# In[25]:
# A = np.array(A)
# print(sum(A<0))
# if sum(A<0)%2 == 0:
#    print(sum(abs(A)))
# else:
#    print(sum(abs(A[1:])) - abs(A[0]))
# In[29]:
B = list(map(abs, A))
C = [a for a in A if a < 0]
# print(A)
# print(B)
# print(C)
# In[30]:
if len(C) % 2 == 0:
    print((sum(B)))
else:
    print((sum(B) - min(B) * 2))
# In[ ]:

-# In[20]: +# In[28]: -import numpy as np - -A.sort(key=lambda x: abs(x)) +# import numpy as np +# A.sort(key=lambda x:abs(x)) -A = np.array(A) +# A = np.array(A) -if sum(A < 0) % 2 == 0: -    print((sum(abs(A)))) +# if sum(A<0)%2 == 0: +#    print(sum(abs(A))) +# else: +#    print(sum(abs(A[1:])) - abs(A[0])) +# In[29]: +B = list(map(abs, A)) +C = [a for a in A if a < 0] +# print(A) +# print(B) +# print(C) +# In[30]: +if len(C) % 2 == 0: +    print((sum(B))) -    print((sum(abs(A[1:])) - abs(A[0]))) +    print((sum(B) - min(B) * 2))