#include <bits/stdc++.h>
int main() {
  int n, k, temp, i, j = 0;
  double summ = 0;
  scanf("%i%i", &n, &k);
  for (i = 0; i < n; ++i) {
    scanf("%i", &temp);
    summ += temp;
  }
  for (j = 0; (int)(summ / i + 0.5) < k; j++) {
    summ += k;
    i++;
  }
  printf("%i", j);
  return 0;
}
