N=int(input ()) A=[int(i) for i in input (). split()] v=int(input()) S=0 for i in range (N): S+=A[i] S-=v print (S)