#include <bits/stdc++.h>
using namespace std;
int main() {
  int n;
  double k;
  cin >> n >> k;
  double k1 = k - 0.5;
  double a[n];
  double sum = 0.0;
  for (int i = 0; i < n; i++) cin >> a[i], sum += a[i];
  int cnt = 0;
  while (1) {
    double val = sum / (double)n;
    if (val >= k1 && val <= k) break;
    cnt++;
    sum += k;
    n++;
  }
  cout << cnt;
  return 0;
}
