#include <bits/stdc++.h>
using namespace std;
int main() {
  double n, m, arr[100], up(0.0), x(1.0), f(0.0), z(0.0);
  cin >> n >> m;
  z = m;
  for (int i = 0; i < n; i++) {
    cin >> arr[i];
    up += arr[i];
  }
  if (up / n >= m - .5) {
    return cout << 0 << "\n", 0;
  }
  for (int i = 0;; i++) {
    up += m;
    f = up / (n + i + 1);
    if (f >= m - .5) {
      return cout << i + 1 << "\n", 0;
    }
  }
  return 0;
}
