#include <bits/stdc++.h>
using namespace std;
int n, a[100100], k;
double med;
string s;
int main() {
  ios_base::sync_with_stdio(0);
  cin.tie(0);
  cout.tie(0);
  cin >> n >> k;
  for (int i = 1; i <= n; i++) {
    cin >> a[i];
    med += a[i];
  }
  int cnt = 0;
  while (round(med / (1.0 * (n + cnt))) != k) med += k, cnt++;
  cout << cnt;
}
