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