#include <bits/stdc++.h>
using namespace std;
const int inf = 1000000000;
const int mod = 1000000007;
int main() {
  int n, k;
  double tot = 0;
  scanf("%d %d", &n, &k);
  int i, j;
  double t1;
  for (i = 1; i <= n; i++) {
    scanf("%lf", &t1);
    tot = tot + t1;
  }
  double basictot = tot;
  int add = 0;
  while (1) {
    double avg = tot / n;
    avg = avg + 0.5;
    int whavg = (int)(avg);
    if (whavg >= k) break;
    add++;
    n++;
    tot += k;
  }
  printf("%d\n", add);
  return 0;
}
