#include <bits/stdc++.h>
using namespace std;
int main() {
  int n, k;
  cin >> n >> k;
  int arr[n + 5];
  long int sum = 0;
  for (int i = 0; i < n; i++) {
    cin >> arr[i];
    sum += arr[i];
  }
  int count = 0;
  int tots;
  while (1) {
    float var = (float)(sum) / n;
    if (var - (int)var >= 0.5) {
      tots = var + 1;
    } else
      tots = var;
    if (tots == k) break;
    sum += k;
    count++;
    n++;
  }
  cout << count;
  return 0;
}
