#include <bits/stdc++.h>
int main() {
  int N, K;
  scanf("%d%d", &N, &K);
  double total = 0;
  for (int i = 0; i < N; i++) {
    double a;
    scanf("%lf", &a);
    total += a;
  }
  int ans = 0;
  while (round(total / N) < K) {
    total += K;
    ans++;
    N++;
  }
  printf("%d\n", ans);
}
