#include <bits/stdc++.h>
using namespace std;
int main() {
  int n, k;
  cin >> n >> k;
  int marks[n], sum = 0, min = 0;
  for (int i = 0; i < n; i++) {
    cin >> marks[i];
    sum += marks[i];
  }
  while (true) {
    if (((double)sum + (double)min * (double)k) / ((double)n + (double)min) >=
        (double)k - 0.5) {
      cout << min << endl;
      return 0;
    } else {
      min++;
    }
  }
}
