import java.util.Scanner object Main extends App { val sc = new Scanner(System.in) val n = sc.nextInt val x = sc.nextInt val an = Array.fill(n)(sc.nextInt) println(x - an.map(a => x - a).sum) }