#include <bits/stdc++.h>
using namespace std;
const int MAXN = 300005;
int sum;
int main() {
  int n, k;
  scanf("%d%d", &n, &k);
  for (int i = 0, x; i < n; ++i) scanf("%d", &x), sum += x;
  for (int i = 0;; ++i) {
    if (2 * sum >= (2 * k - 1) * (n + i)) {
      printf("%d\n", i);
      break;
    }
    sum += k;
  }
  return 0;
}
