#include <bits/stdc++.h>
using namespace std;
int main() {
  int n, k;
  cin >> n >> k;
  double sum = 0, target = (double)k;
  double m = n;
  for (int i = 0; i < n; i++) {
    double in;
    cin >> in;
    sum += in;
  }
  int cont = 0;
  while (((int)(0.5 + sum / m)) < k) {
    sum += k;
    m++;
    cont++;
  }
  cout << cont << "\n";
  return 0;
}
