input_lines = raw_input() input_lines2 = raw_input() input_lines3 = raw_input() print sum([int(k) for k in input_lines2.split()] )- int(input_lines3)