n=int(input()) c=list(map(int,input().split())) if sum(c)<0: c=[-x for x in c] c.sort() a=sum([x for x in c[0:n:2]]) b=sum([x for x in c[1:n:2]]) print(abs(abs(a)-abs(b)))