#include <bits/stdc++.h>
using namespace std;
int main() {
  int n, n1;
  float k;
  cin >> n >> k;
  int a[n];
  long long int sum = 0;
  for (int i = 0; i < n; i++) {
    cin >> a[i];
    sum += a[i];
  }
  n1 = n;
  while (float(float(sum) / n) < (k - 1) + 0.5) {
    sum += k;
    n++;
  }
  cout << n - n1;
  return 0;
}
