#include <bits/stdc++.h>
using namespace std;
const int INF = 0x3f3f3f3f;
int main() {
  long long i, j, k, l, r, co = 0;
  long long n, m, t, a, b, c;
  cin >> n >> k;
  for (i = 0; i < n; i++) cin >> a, co += a;
  i = 0;
  while (1) {
    m = (co + i * k) * 1.0 / (i + n) * 1.0 + 0.5;
    if (m == k) break;
    i++;
  }
  cout << i << endl;
  return 0;
}
