#include <bits/stdc++.h>
using namespace std;
int read() {
  int x;
  scanf("%d", &x);
  return x;
}
long long readL() {
  long long x;
  scanf("%I64d", &x);
  return x;
}
const int MAX = 26;
int main() {
  int n, k, c = 0, cnt = 0;
  cin >> n >> k;
  for (int i = 0; i < n; i++) {
    int a;
    cin >> a;
    c += a;
  }
  while (1) {
    if (1.0 * c / n >= (1.0 * k) - 0.5) break;
    c += k;
    n++;
    cnt++;
  }
  cout << cnt << endl;
  return 0;
}
