#include <bits/stdc++.h>
using namespace std;
int main() {
  int n, k;
  cin >> n >> k;
  double x, sum = 0;
  for (int i = 1; i <= n; i++) {
    scanf("%lf", &x);
    sum += x;
  }
  int t = 0;
  double s = sum / n * 1.0;
  while (s < k * 1.0 - 0.5) {
    t++;
    s = (sum + t * k) * 1.0 / (n + t) * 1.0;
  }
  cout << t << endl;
}
