#include <bits/stdc++.h>
using namespace std;
int main() {
  int n;
  int k;
  cin >> n >> k;
  int a[n];
  double sum = 0;
  for (int i = 0; i < n; i++) {
    cin >> a[i];
    sum += a[i];
  }
  double x = sum / n;
  if (x - floor(x) >= 0.5)
    x = ceil(x);
  else
    x = floor(x);
  int b = 0;
  while (x != k) {
    sum += k;
    n++;
    b++;
    x = sum / n;
    if (x - floor(x) >= 0.5)
      x = ceil(x);
    else
      x = floor(x);
  }
  cout << b;
}
