input() for i,x in enumerate(list(map(int,input().split()))): if x<0:x*=-1 if i==0:s=0 if x==1 else 1 if x>1:s*=x else: s+=x print(s)