#include <bits/stdc++.h>
using namespace std;
int main() {
  int n, k;
  scanf("%d %d", &n, &k);
  int sum = 0;
  for (int i = 0; i < n; i++) {
    int a;
    scanf("%d", &a);
    sum += a;
  }
  double d = k - 0.5;
  int ans = ceil((d * n - sum) / (k - d));
  ans = max(ans, 0);
  printf("%d\n", ans);
  return 0;
}
