#include <bits/stdc++.h>
using namespace std;
const double eps = 0.5;
int n, k;
int main() {
  while (scanf("%d %d", &n, &k) != EOF) {
    int sum = 0;
    for (int i = 1; i <= n; i++) {
      int x;
      scanf("%d", &x);
      sum += x;
    }
    double pp = (double)sum / (double)n;
    int num = (int)pp;
    if ((pp - (int)pp) >= eps) num++;
    int cnt = 0;
    while (num != k) {
      sum += k;
      cnt++;
      pp = (double)sum / (double)(n + cnt);
      num = (int)pp;
      if ((pp - (int)pp) >= eps) num++;
    }
    printf("%d\n", cnt);
  }
  return 0;
}
