#include <bits/stdc++.h>
using namespace std;
int main() {
  int n;
  double k, x, sum = 0;
  cin >> n >> k;
  for (int i = 1; i <= n; i++) {
    cin >> x;
    sum += x;
  }
  int kol = 0;
  while (sum / (n * 1.0) < k - 0.5) {
    kol++;
    n++;
    sum += k;
  }
  cout << kol;
  return 0;
}
