#include <bits/stdc++.h>
using namespace std;
int main() {
  int n, k;
  cin >> n >> k;
  int nu[n];
  double sum = 0;
  for (int i = 0; i < n; i++) {
    cin >> nu[i];
    sum += nu[i];
  }
  double avg = sum / n;
  int count = 0;
  double n2 = n;
  while (avg < k - 0.5) {
    sum += k;
    count++;
    n2++;
    avg = sum / n2;
  }
  cout << count;
}
