#include <bits/stdc++.h>
using namespace std;
int main() {
  int n;
  double k;
  scanf("%d %lf", &n, &k);
  double avr = 0;
  for (int i = 0, a; i < n; i++) {
    scanf("%d", &a);
    avr += a;
  }
  int ct;
  for (ct = 0; avr / n + 0.5 < k; avr += k, n++, ct++) {
  }
  printf("%d", ct);
  return 0;
}
