#include <bits/stdc++.h>
using namespace std;
int n, k, ans = 0;
double avg, maxi;
int tmp1 = 0, sum = 0;
int main() {
  scanf("%d%d", &n, &k);
  maxi = k - 0.5;
  for (int i = 0; i < n; i++) {
    scanf("%d", &tmp1);
    sum += tmp1;
  }
  avg = sum * 1.0 / n;
  while (avg < maxi) {
    sum += k;
    n++;
    avg = sum * 1.0 / n;
    ans++;
  }
  printf("%d\n", ans);
  return 0;
}
