#include <bits/stdc++.h>
using namespace std;
const long long mod = 1000000007;
int main() {
  float n, k, sum = 0, a, N = 0;
  cin >> n >> k;
  float p = n;
  while (n--) {
    cin >> a;
    sum = sum + a;
  }
  float x = (sum + N * k) / (N + p);
  float y = k - 0.5;
  int z = k;
  while (x < y) {
    N++;
    x = (sum + N * k) / (N + p);
  }
  if (x > z) {
    cout << N - 1;
    return 0;
  }
  cout << N;
  return 0;
}
