#include <bits/stdc++.h>
using ll = long long;
using namespace std;
int main() {
  int n, k;
  cin >> n >> k;
  int sum = 0;
  for (int i = 0; i < n; i++) {
    int x;
    cin >> x;
    sum += x;
  }
  int ans = 0;
  while (round(sum / (double)n) < k) {
    sum += k;
    n++;
    ans++;
  }
  cout << ans << '\n';
  return 0;
}
