#include <bits/stdc++.h>
using namespace std;
int main() {
  int n, i, pdd;
  double m, k, s, j;
  s = 0;
  cin >> n >> k;
  for (i = 0; i < n; i++) {
    cin >> m;
    s += m;
  }
  j = s;
  j /= n;
  pdd = 0;
  while (j < k - 0.5) {
    s += 0.5;
    j = s / n;
    pdd++;
  }
  cout << pdd << endl;
}
