#include <bits/stdc++.h>
using namespace std;
long long int fpow(long long int n, long long int k,
                   long long int p = 1000000007) {
  long long int r = 1;
  n = n % p;
  while (k > 0) {
    if (k & 1) {
      r = (r * n) % p;
    }
    k = k >> 1;
    n = (n * n) % p;
  }
  return r;
}
int main() {
  ios_base::sync_with_stdio(false);
  cin.tie(0);
  cout.tie(0);
  long long int n, k;
  cin >> n >> k;
  long long int a[n];
  long long int sum = 0;
  for (long long int i = 0; i < n; i++) {
    cin >> a[i];
    sum += a[i];
  }
  long long int cnt = 0;
  long long int x = round(sum * 1.0 / n);
  if (x >= k) {
    cout << 0;
    return 0;
  }
  for (long long int i = 1;; i++) {
    sum += k;
    cnt++;
    double y = sum * 1.0 / (n + i);
    x = round(y);
    if (x >= k) {
      cout << cnt;
      return 0;
    }
  }
  return 0;
}
