#include <bits/stdc++.h>
using namespace std;
int n, k, p;
int a[105];
int main() {
  scanf("%d%d", &n, &k);
  int sum = 0;
  for (int i = 1; i <= n; i++) {
    scanf("%d", &a[i]);
    a[i] *= 2;
    sum += a[i];
  }
  p = k * 2;
  k = k * 2 - 1;
  int kk = k * n;
  int ans = 0;
  while (sum < kk) {
    sum += p;
    kk += k;
    ans++;
  }
  cout << ans << endl;
}
