#include <bits/stdc++.h>
using namespace std;
int main() {
  std::ios_base::sync_with_stdio(false);
  long long int n, k;
  cin >> n >> k;
  long long int a[n], i, sum = 0;
  for (i = 0; i < n; i++) {
    cin >> a[i];
    sum += a[i];
  }
  long long int count = 0;
  while (k - (double)sum / (n + count) > 0.5) {
    sum += k;
    count++;
  }
  cout << count;
  return 0;
}
