You are given a sequence a consisting of n integers. You may partition this sequence into two sequences b and c in such a way that every element belongs exactly to one of these sequences. 

Let B be the sum of elements belonging to b, and C be the sum of elements belonging to c (if some of these sequences is empty, then its sum is 0). What is the maximum possible value of B - C?


-----Input-----

The first line contains one integer n (1 ≤ n ≤ 100) — the number of elements in a.

The second line contains n integers a_1, a_2, ..., a_{n} ( - 100 ≤ a_{i} ≤ 100) — the elements of sequence a.


-----Output-----

Print the maximum possible value of B - C, where B is the sum of elements of sequence b, and C is the sum of elements of sequence c.


-----Examples-----
Input
3
1 -2 0

Output
3

Input
6
16 23 16 15 42 8

Output
120



-----Note-----

In the first example we may choose b = {1, 0}, c = { - 2}. Then B = 1, C =  - 2, B - C = 3.

In the second example we choose b = {16, 23, 16, 15, 42, 8}, c = {} (an empty sequence). Then B = 120, C = 0, B - C = 120.

Difficulty: interview

Starter code:

Solutions:

n=int(input())
arr= list(map(int,input().strip().split(' ')))
s = 0
for i in range(n):
   s+=abs(arr[i])
print(s)

n = int(input())
a = [int(v) for v in input().split()]

print(sum(abs(v) for v in a))


n = int(input())
arr = list(map(int, input().split()))
b = c = 0
for val in arr:
    if val >= 0:
        b += val
    else:
        c += val
print(b - c)

n = int(input())
a = list(map(int, input().split()))
ans = 0
for i in a:
    ans += abs(i)

print(ans)


n = int(input())
a = [int(i) for i in input().split()]
b = [i for i in a if i >= 0]
c = [i for i in a if i < 0]
print(sum(b) - sum(c))

n = int(input())
A = list(map(int, input().split()))
B = [abs(a) for a in A]
print(sum(B))

input()
a=list(map(int,input().split()))
print(sum(x for x in a if x > 0)-sum([x for x in a if x<0]))


from sys import stdin, stdout

n = int(stdin.readline())
first, second = 0, 0

values = list(map(int, stdin.readline().split()))
for v in values:
    if v >= 0:
        first += v
    else:
        second += v

stdout.write(str(first - second))

n = int(input())
v = [int(x) for x in input().split()]
ans = 0
for x in v:
	ans += x if x > 0 else -x
print(ans)


n = int(input())
a = list(map(int, input().split()))

b = []
c = []
for k in a:
    if k> 0:
        b.append(k)
    else:
        c.append(k)

print(sum(b)-sum(c))

n = int(input())
L = list(map(int, input().split()))
L = list(map(abs, L))
print(sum(L))



n = int(input())
a = list(map(int,input().split()))
t = min(a)
if t<0:
	p = 0
	n = 0
	for i in a:
		if i>0:
			p+=i
		else:
			n+=i
	print (p-n)
else:
	print (sum(a))

n = int(input())
a = list(map(int, input().split()))
b = [i for i in a if i < 0]
print(sum(a) - 2 * sum(b))


R=lambda:map(int,input().split())

n = int(input())

a = list(R())

s = 0 

for i in range(n):
    if a[i] >= 0:
        s += a[i]
    else: s -= a[i]
    
print(s)

n = int(input())
a = list(map(int, input().split()))
b=[i for i in a if i > 0]
c=[i for i in a if i <= 0]
sb = 0
sc = 0
if len(b) > 0:
    sb = sum(b)
if len(c) > 0:
    sc = sum(c)
print(sb-sc)


n = int(input())

lst = []
for x in input().split():
    lst.append(int(x))

sum_1 = 0
sum_2 = 0
for x in lst:
    if x >= 0:
        sum_1 += x
    else:
        sum_2 += x

print(sum_1 - sum_2)


input()
print(sum(map(abs, map(int, input().split()))))

def read():
    return list(map(int,input().split()))
n=int(input())
a=read()
B=0
C=0
for i in a:
    if i>0:
        B+=i
    else:
        C+=i
print(B-C)


n=int(input())
a=[int(x) for x in input().split()]
b=0
c=0
for i in range(len(a)):
    if a[i]<0:
        c+=a[i]*(-1)
    elif a[i]>=0:
        b+=a[i]
ans=b+c
print(ans)


n = int(input())
a = list(map(int, input().split()))
num = 0
for i in range(n):
    if a[i] < 0:
        num += -1 * a[i]
    else:
        num += a[i]

print(num)

n=int(input())
a=[int(x) for x in input().split()]
b=[]
c=[]
for i in a:
	if i>=0:
		b.append(i)
	else:
		c.append(i)
print(sum(b)-sum(c))

n = int(input())
a= list(map(int,input().split()))
for i in range(len(a)):
    a[i] = abs(a[i])
print(sum(a))

n = int(input())
a = list(map(int,input().split(" ")))

sumv = 0
for i in range(n):
	if a[i] < 0:
		sumv -= a[i]
	else:
		sumv += a[i]

print(sumv)

n = int(input())
seq = list(map(int, input().split(' ')))

tot = 0
for x in seq:
    if x < 0:
        tot += - x
    else:
        tot += x

print(tot)


def solve():
    n = int(input())
    A = list(map(int, input().split()))

    res = 0
    for a in A:
        if a >= 0:
            res += a
        else:
            res -= a

    print(res)


def __starting_point():
    solve()



__starting_point()