#include <bits/stdc++.h>
int main() {
  int n, k, a[101], i;
  double avg = 0, sum;
  scanf("%d %d", &n, &k);
  for (i = 0; i < n; i++) {
    scanf("%d", &a[i]);
    avg = avg + a[i];
  }
  sum = avg;
  avg = round(avg / n);
  for (i = 0;; i++) {
    avg = round((sum + i * k) / (double)(n + i));
    if (avg >= k) break;
  }
  printf("%d\n", i);
  return 0;
}
