#include <bits/stdc++.h>
using namespace std;
int main() {
  int n, i;
  double z = 0, k, l = 0, avg;
  cin >> n >> k;
  double a[n];
  for (i = 0; i < n; i++) {
    cin >> a[i];
    z = z + a[i];
  }
  avg = double(z / n);
  while (avg <= (k - 0.5)) {
    l++;
    avg = double((z + k) / (n + l));
    z = z + k;
  }
  if (l == 0)
    cout << l;
  else
    cout << l - 1;
  return 0;
}
