#include <bits/stdc++.h>
using namespace std;
int main() {
  int n, k, ans = 0;
  cin >> n >> k;
  double s = 0, sum = 0, kol = 0;
  int i;
  for (i = 1; i <= n; i++) {
    int a;
    cin >> a;
    s += a;
    sum += a;
  }
  s = s / n;
  if (s == k) {
    cout << 0;
    return 0;
  }
  if (int(s + 1) - s <= s - int(s))
    s = int(s + 1);
  else
    s = int(s);
  i = 0;
  if (s != k)
    while (kol != k) {
      ans++;
      sum += k;
      i++;
      kol = 0;
      kol = sum / (i + n);
      if (int(kol) != kol) {
        if (int(kol + 1) - kol <= kol - int(kol))
          kol = int(kol + 1);
        else
          kol = int(kol);
      }
    }
  cout << ans;
}
