#include <bits/stdc++.h>
using namespace std;
void debug(int n, ...) {
  va_list v1;
  va_start(v1, n);
  for (int i = 0; i < n; i++) {
    int val = va_arg(v1, int);
    printf("%d ", val);
  }
  va_end(v1);
  printf("\n");
}
double n, k;
double sum;
int ans;
int main() {
  cin >> n >> k;
  for (int i = 0; i < n; i++) {
    double m;
    cin >> m;
    sum += m;
  }
  while (sum / (double)n < (k - 0.5)) {
    sum += k;
    ans++;
    n++;
  }
  cout << ans;
}
