#include <bits/stdc++.h>
using namespace std;
int main() {
  int n, k;
  scanf("%d %d", &n, &k);
  vector<bool> neg;
  for (int i = 0; i < n; i++) {
    int cur;
    scanf("%d", &cur);
    neg.push_back(cur < 0);
  }
  int cnt = 0;
  for (auto ele : neg) cnt += (int)ele;
  if (cnt > k) {
    puts("-1");
    return 0;
  }
  k -= cnt;
  int ans = 0;
  int status = 1;
  for (auto ele : neg) {
    if (ele) {
      if (status == 1) {
        ans++;
        status = -1;
      }
    } else {
      if (status == -1) {
        ans++;
        status = 1;
      }
    }
  }
  status = 1;
  int prev = -1;
  vector<int> lens;
  for (int i = 0; i < n; i++) {
    if (neg[i] && i > 0 && neg[i - 1] == false && prev != -1) {
      lens.push_back(i - prev);
    }
    if (neg[i] == false && i > 0 && neg[i - 1]) {
      prev = i;
    }
  }
  sort(lens.rbegin(), lens.rend());
  for (int i = lens.size() - 1; i >= 0; i--) {
    if (lens[i] > k) break;
    ans -= 2;
    k -= lens[i];
  }
  if (prev != -1) {
    int ll = n - prev;
    if (ll <= k) ans--;
  }
  printf("%d\n", ans);
}
