#include <bits/stdc++.h>
using namespace std;
using PII = pair<int, int>;
int N, K;
bool use[200000];
int main() {
  int t;
  scanf("%d %d", &N, &K);
  int cnt = K;
  for (int i = 0; i < N; i++) {
    scanf("%d", &t);
    if (t < 0) {
      use[i] = true;
      cnt--;
    }
  }
  if (cnt < 0) {
    puts("-1");
    return 0;
  }
  bool winter = false;
  int pos = -1;
  priority_queue<PII, vector<PII>, greater<PII>> que;
  for (int i = 0; i < N; i++) {
    if (!winter && use[i]) {
      if (pos != -1) {
        que.push({i - pos, pos});
      }
      winter = true;
    } else if (winter && !use[i]) {
      pos = i;
      winter = false;
    }
  }
  PII last_p = {200001, -1};
  if (!winter) {
    last_p = {N - pos, pos};
  }
  while (!que.empty()) {
    PII p = que.top();
    que.pop();
    if (p.first <= cnt) {
      cnt -= p.first;
      for (int i = 0; i < p.first; i++) {
        use[p.second + i] = true;
      }
    } else {
      break;
    }
  }
  if (last_p.first <= cnt) {
    cnt -= last_p.first;
    for (int i = 0; i < last_p.first; i++) {
      use[last_p.second + i] = true;
    }
  }
  winter = false;
  int ans = 0;
  for (int i = 0; i < N; i++) {
    if (!winter && use[i]) {
      winter = true;
      ans++;
    } else if (winter && !use[i]) {
      winter = false;
      ans++;
    }
  }
  printf("%d\n", ans);
}
