#include <bits/stdc++.h>
int main() {
  int n, k;
  scanf("%d %d", &n, &k);
  double ans = 0, a;
  for (int i = 1; i <= n; i++) scanf("%lf", &a), ans += a;
  int cut = 0;
  while (ans / n < k - 0.5) ans += k, n++, cut++;
  printf("%d\n", cut);
  return 0;
}
