#include <bits/stdc++.h>
using namespace std;
double sum, pd;
int a, b, c, num;
int main() {
  cin >> a >> b;
  for (int i = 1; i <= a; i++) {
    cin >> c;
    sum += c;
  }
  pd = b - 0.5;
  if (sum / a >= pd) {
    cout << "0";
    return 0;
  }
  while (1) {
    num++;
    if ((sum + b * num) / (a + num) >= pd) {
      cout << num;
      return 0;
    }
  }
  return 0;
}
