//Nayeem Shahriar Joy, Applied Physics & Electronic Engineering, University of Rajshahi.
import java.util.Scanner;
public class JavaApplication1 {
/**
* @param args the command line arguments
*/
public static void main(String[] args) {
Scanner io=new Scanner(System.in);
int n=io.nextInt();
int x=io.nextInt();
int sum=0;
for(int i=0;i<x;i++)
{
int m=io.nextInt();
sum=sum+m;
}
System.out.println((n*(x+1)-sum));
// TODO code application logic here
}
No comments:
Post a Comment