#include <bits/stdc++.h>
using namespace std;
;
int n, k, sum = 0, a, tmp;
int main() {
  cin >> n >> k;
  for (int i = 0; i < n; i++) {
    cin >> a;
    sum += a;
  }
  for (int i = 0;; i++) {
    tmp = sum + i * k;
    if (tmp >= (k - 0.5) * (n + i)) {
      cout << i << endl;
      break;
    }
  }
  return 0;
}
