using System; using System.Collections.Generic; using System.Linq; using System.Text; using System.Threading.Tasks; namespace yukikoda { class Program { static void Main(string[] args) { Console.ReadLine(); var a = ConvertStringArrayToIntList(Console.ReadLine().Split()); Console.WriteLine(a.Sum() - long.Parse(Console.ReadLine())); } static List ConvertStringArrayToIntList(string[] str) { var list = new List(); foreach (var c in str) list.Add(int.Parse(c)); return list; } } }