#include <bits/stdc++.h>
int main(int argc, char **argv) {
  int n;
  scanf("%d", &n);
  int n2 = n;
  int k;
  scanf("%d", &k);
  int sum = 0;
  for (int i = 0; i < n; ++i) {
    int m;
    scanf("%d", &m);
    sum += m;
  }
  int final_mark = (int)round(((float)sum) / n);
  while (final_mark != k) {
    sum += k;
    ++n;
    final_mark = (int)round(((float)sum) / n);
  }
  std::cout << (n - n2) << "\n";
}
