#include <bits/stdc++.h>
using namespace std;
int mod = 1000000007;
const int N = 1000005;
long long gcd(long long a, long long b) {
  if (b == 0) return a;
  return gcd(b, a % b);
}
int main() {
  ios::sync_with_stdio(false);
  cin.tie(NULL);
  int n, k;
  cin >> n >> k;
  double a[n + 1];
  double sum = 0;
  for (int i = 0; i < n; i++) cin >> a[i], sum += a[i];
  double avg = sum / n;
  int loc = int(avg + 0.5);
  if (loc == k) {
    cout << 0;
    return 0;
  }
  for (int i = 1;; i++) {
    sum += k;
    avg = sum / (n + i);
    int loc = int(avg + 0.5);
    if (loc == k) {
      cout << i;
      return 0;
    }
  }
  return 0;
}
