#include <bits/stdc++.h>
using namespace std;
int main() {
  double n, k;
  double arra[1000];
  int i, j;
  cin >> n >> k;
  double sum = 0.00;
  for (i = 0; i < n; i++) {
    cin >> arra[i];
    sum = sum + arra[i];
  }
  double avg;
  avg = sum / (double)n;
  if (fabs(avg - k) <= .5) {
    cout << "0" << endl;
    return 0;
  }
  for (i = 1;; i++) {
    if (fabs(avg - k) <= .5) break;
    sum = sum + k;
    n++;
    avg = sum / (double)n;
  }
  cout << i - 1 << endl;
}
