#include <bits/stdc++.h>
using namespace std;
int n, k, a[1001];
char mark[9];
int main() {
  double m, s = 0;
  scanf("%d%d", &n, &k);
  for (int p = (1); p <= (n); p += (1)) {
    scanf("%d", &a[p]);
    s += a[p];
  }
  int t = 0;
  while (1) {
    sprintf(mark, "%.0lf", s / n);
    sscanf(mark, "%lf", &m);
    if (m >= 1.0 * k) break;
    s += k;
    n++;
    t++;
  }
  printf("%d\n", t);
}
