#include <bits/stdc++.h>
using namespace std;
int main() {
  int n, k;
  float s = 0;
  cin >> n >> k;
  int t[n];
  for (int i = 0; i < n; i++) {
    cin >> t[i];
    s += t[i];
  }
  int tmpn = n;
  while (s / tmpn < k - 0.5) {
    s += k;
    tmpn += 1;
  }
  cout << tmpn - n;
  return 0;
}
