#include <bits/stdc++.h>
using namespace std;
int main() {
  int n, k;
  cin >> n >> k;
  vector<int> a(n);
  double sum = 0;
  for (int i = 0; i < n; i++) {
    cin >> a[i];
    sum += a[i];
  }
  int count = 0;
  while (round(sum / n) != k) {
    sum += k;
    n++;
    count++;
  }
  cout << count;
  return 0;
}
