#include <bits/stdc++.h>
using namespace std;
const long long int maxn = 1e3 + 2;
const long long int mod = 1e3 + 2;
int main() {
  ios_base::sync_with_stdio(false);
  cin.tie(NULL);
  cout.tie(NULL);
  long long int n, k, x, s = 0, a = 0, ans = 0;
  cin >> n >> k;
  for (long long int i = 0; i < n; i++) {
    cin >> x;
    s = s + x;
  }
  a = round(float(s * 1.0 / n * 1.0));
  while (a < k) {
    s = s + k;
    n = n + 1;
    ans = ans + 1;
    a = round(float(s * 1.0 / n * 1.0));
  }
  cout << ans << endl;
  return 0;
}
