Buggy python submission (verdict: Runtime Error):
n = int(input())
w = input().split(" ")

a = []
k = False
z = False
for i in range(n):
    a.append(int(w[i]))
    if a[i] < 0:
        a[i] *= -1
        k = not (k)
    if a[i] == 0:
        z = True
    if i == 1:
        min = a[i]
    if a[i] < min:
        min = a[i]

sum = sum(a)
if k and not(z):
    sum -= min
print(sum)

Fixed submission:
n = int(input())
w = input().split(" ")

a = []
m = 0
k = False
for i in range(n):
    a.append(int(w[i]))
    if a[i] < 0:
        a[i] *= -1
        k = not (k)
    if i == 0:
        m = a[i]
    if a[i] < m:
        m = a[i]

sum = sum(a)
if k:
    sum -= m*2
print(sum)

Buggy python submission (verdict: Runtime Error):
n = int(input())
w = input().split(" ")

a = []
k = False
for i in range(n):
    a.append(int(w[i]))
    if a[i] < 0:
        a[i] *= -1
        k = not(k)
    if i == 1:
        min = a[i]
    if a[i] < min:
        min = a[i]

sum = sum(a)
if k:
    sum -= min
print(sum)

Fixed submission:
n = int(input())
w = input().split(" ")

a = []
m = 0
k = False
for i in range(n):
    a.append(int(w[i]))
    if a[i] < 0:
        a[i] *= -1
        k = not (k)
    if i == 0:
        m = a[i]
    if a[i] < m:
        m = a[i]

sum = sum(a)
if k:
    sum -= m*2
print(sum)

Buggy python submission (verdict: Runtime Error):
n = int(input())
w = input().split(" ")

a = []
k = False
for i in range(n):
    a.append(int(w[i]))
    if a[i] < 0:
        a[i] *= -1
        k = not(k)
    if i == 1:
        min = a[i]
    if a[i] < min:
        min = a[i]

sum = sum(a)
if k:
    sum -= min
print(sum)

Fixed submission:
n = int(input())
w = input().split(" ")

a = []
m = 0
k = False
for i in range(n):
    a.append(int(w[i]))
    if a[i] < 0:
        a[i] *= -1
        k = not (k)
    if i == 0:
        m = a[i]
    if a[i] < m:
        m = a[i]

sum = sum(a)
if k:
    sum -= m*2
print(sum)

Buggy python submission (verdict: Runtime Error):
n = int(input())
w = input().split(" ")

a = []
k = False
for i in range(n):
    a.append(int(w[i]))
    if a[i] < 0:
        a[i] *= -1
        k = not(k)
    if i == 1:
        min = a[i]
    if a[i] < min:
        min = a[i]

sum = sum(a)
if k:
    sum -= min
print(sum)

Fixed submission:
n = int(input())
w = input().split(" ")

a = []
m = 0
k = False
for i in range(n):
    a.append(int(w[i]))
    if a[i] < 0:
        a[i] *= -1
        k = not (k)
    if i == 0:
        m = a[i]
    if a[i] < m:
        m = a[i]

sum = sum(a)
if k:
    sum -= m*2
print(sum)

Buggy python submission (verdict: Runtime Error):
n = int(input())
w = input().split(" ")

a = []
k = False
for i in range(n):
    a.append(int(w[i]))
    if a[i] < 0:
    	a[i] *= -1
        k= not(k)
    if i == 1:
        min = a[i]
    if a[i] < min:
        min = a[i]
2
sum = sum(a)
if k:
    sum -= min
print(sum)

Fixed submission:
n = int(input())
w = input().split(" ")

a = []
m = 0
k = False
for i in range(n):
    a.append(int(w[i]))
    if a[i] < 0:
        a[i] *= -1
        k = not (k)
    if i == 0:
        m = a[i]
    if a[i] < m:
        m = a[i]

sum = sum(a)
if k:
    sum -= m*2
print(sum)

Buggy python submission (verdict: Runtime Error):
n = int(input())
w = input().split(" ")

a = []
k = False
for i in range(n):
    a.append(int(w[i]))
    if a[i] < 0:
       a[i] *= -1
       k = not(k)
    if i == 1:
        min = a[i]
    if a[i] < min:
        min = a[i]
2
sum = sum(a)
if k:
    sum -= min
print(sum)

Fixed submission:
n = int(input())
w = input().split(" ")

a = []
m = 0
k = False
for i in range(n):
    a.append(int(w[i]))
    if a[i] < 0:
        a[i] *= -1
        k = not (k)
    if i == 0:
        m = a[i]
    if a[i] < m:
        m = a[i]

sum = sum(a)
if k:
    sum -= m*2
print(sum)

Buggy python submission (verdict: Runtime Error):
n = int(input())
w = input().split(" ")

a = []
k = False
for i in range(n):
    a.append(int(w[i]))
    if a[i] < 0:
       a[i] *= -1
       k = not(k)
    if i == 1:
        min = a[i]
    if a[i] < min:
        min = a[i]
2
sum = sum(a)
if k:
    sum -= min
print(sum)


Fixed submission:
n = int(input())
w = input().split(" ")

a = []
m = 0
k = False
for i in range(n):
    a.append(int(w[i]))
    if a[i] < 0:
        a[i] *= -1
        k = not (k)
    if i == 0:
        m = a[i]
    if a[i] < m:
        m = a[i]

sum = sum(a)
if k:
    sum -= m*2
print(sum)

Buggy python submission (verdict: Runtime Error):
n = int(input())
w = input().split(' ')

a = []
k = False
for i in range(n):
    a.append(int(w[i]))
    if a[i] < 0:
       a[i] *= -1
       k = not(k)
    if i == 1:
        min = a[i]
    if a[i] < min:
        min = a[i]

sum = sum(a)
if k:
    sum -= min
print(sum)

Fixed submission:
n = int(input())
w = input().split(" ")

a = []
m = 0
k = False
for i in range(n):
    a.append(int(w[i]))
    if a[i] < 0:
        a[i] *= -1
        k = not (k)
    if i == 0:
        m = a[i]
    if a[i] < m:
        m = a[i]

sum = sum(a)
if k:
    sum -= m*2
print(sum)