#include <bits/stdc++.h>
using namespace std;
const int mx = 2e5 + 10;
int main() {
  int n;
  double arr[mx], total = 0, p = 0, m;
  scanf("%d %lf", &n, &m);
  for (int i = 0; i < n; i++) {
    scanf("%lf", &arr[i]);
    total += arr[i];
    p++;
  }
  int ans = 0;
  while (total / p < m - 0.5) {
    total += m;
    p++;
    ans++;
  }
  cout << ans << endl;
}
