#include <bits/stdc++.h>
using namespace std;
void fast() {
  ios_base::sync_with_stdio(false);
  cin.tie(NULL);
  cout.tie(NULL);
}
bool sortbysec(const pair<long long, long long>& a,
               const pair<long long, long long>& b) {
  return (a.second < b.second);
}
void solve() {
  long long n, k;
  cin >> n >> k;
  long long sum = 0;
  for (long long i = 0; i < n; i++) {
    long long a;
    cin >> a;
    sum += a;
  }
  long long cnt = 0;
  while ((long double)sum < (long double)(k - 0.5) * (long double)n) {
    cnt++;
    n++;
    sum += k;
  }
  cout << cnt;
}
int main() {
  fast();
  long long t;
  t = 1;
  while (t--) {
    solve();
  }
}
