#include <bits/stdc++.h>
using namespace std;
int main() {
  float n, k;
  cin >> n >> k;
  float sum = 0, a;
  for (int i = 0; i < n; i++) {
    cin >> a;
    sum += a;
  }
  int c = 0;
  float ans = sum / n;
  float p = k - 0.5;
  while (ans - p < 0) {
    sum = sum + k;
    n++;
    ans = sum / n;
    c++;
  }
  cout << c << endl;
  return 0;
}
