#include <bits/stdc++.h>
using namespace std;
long long s, n, k, z;
int main() {
  cin >> n >> k;
  for (int i = 0; i < n; i++) {
    cin >> z;
    s += z;
  }
  int i = n;
  while ((long double)(s) / i < (long double)k - 0.5) {
    i++;
    s += k;
  }
  cout << i - n;
}
