import sequtils,strutils,math var N = stdin.readline.parseInt A = stdin.readline.split.map(parseInt) u = stdin.readline.parseInt echo sum(A) - u