Pero signed a data plan with his internet provider. The provider lets Pero use up to X megabytes of internet per month. Every megabyte he does not spend during a month carries over to the next month and can still be spent. Pero can never spend more megabytes than he has left.
Given how many megabytes Pero spent in each of the first N months on the plan, find how many megabytes Pero has available in month N+1.
Input
The first line contains the integer X (1≤X≤100).
The second line contains the integer N (1≤N≤100).
Each of the next N lines contains an integer Pi (0≤Pi≤10000), the number of megabytes spent in month i on the plan. The input never makes Pero spend more megabytes than he has left.
Output
Print the number of megabytes Pero has available in month N+1.