#include <bits/stdc++.h>
using namespace std;
int nxt() {
  int x;
  cin >> x;
  return x;
}
int main() {
  int n = nxt(), k = nxt();
  vector<int> a(n);
  generate(a.begin(), a.end(), nxt);
  int s = accumulate(a.begin(), a.end(), 0);
  int ans = 0;
  while ((s + k * ans) * 1.0 / (n + ans) < k - 0.5) {
    ans++;
  }
  cout << ans;
  return 0;
}
