_ = input() print(sum([int(i) for i in input().strip().split()]) - int(input()))