i,j=input,int i() print(sum(list(map(j,i().split())))-j(i()))