#include <bits/stdc++.h>
using namespace std;
int n, A[200001], k, cur;
vector<int> Q;
int main() {
  scanf("%d%d", &n, &k);
  cur = 0;
  for (int i = 1; i <= n; i++) {
    scanf("%d", &A[i]);
    cur += (A[i] < 0 ? 1 : 0);
  }
  if (cur > k) {
    printf("-1");
    return 0;
  }
  if (!cur) {
    printf("0");
    return 0;
  }
  k -= cur;
  cur = 1;
  while (cur <= n && A[cur] >= 0) cur++;
  int tcur = 0;
  for (int i = cur; i <= n; i++)
    if (A[i] < 0) {
      if (tcur) Q.push_back(tcur);
      tcur = 0;
    } else
      tcur++;
  int res = (Q.size() + 1) * 2;
  if (!Q.empty()) {
    sort(Q.begin(), Q.end());
    for (int i = 0; i <= Q.size() - 1; i++)
      if (k >= Q[i]) {
        k -= Q[i];
        res -= 2;
      }
  }
  if (k >= tcur) res--;
  printf("%d", res);
  return 0;
}
