#include <bits/stdc++.h>
using namespace std;
int a[200001];
vector<int> v, v1;
int main() {
  int n, k, cnt = 0;
  scanf("%d%d", &n, &k);
  int naive = 0;
  for (int i = 0; i < n; i++) {
    scanf("%d", &a[i]);
    if (a[i] < 0) {
      cnt++;
      if (i > 0 && a[i - 1] >= 0) {
        naive++;
      } else if (i == 0) {
        naive++;
      }
      v.push_back(i);
    } else {
      if (i > 0 && a[i - 1] < 0) {
        naive++;
      }
    }
  }
  if (k < cnt) {
    printf("-1");
    return 0;
  }
  if (v.size() == 0) {
    printf("0");
    return 0;
  }
  k = k - cnt;
  for (int i = 0; i < v.size() - 1; i++) {
    int x = v[i];
    int y = v[i + 1];
    if (y == x + 1) continue;
    v1.push_back(y - x - 1);
  }
  sort(v1.begin(), v1.end());
  int i;
  for (i = 0; i < v1.size(); i++) {
    if (k <= 0) break;
    if (v1[i] <= k) {
      k -= v1[i];
      naive -= 2;
    } else
      break;
  }
  if ((n - 1) > (v[v.size() - 1])) {
    if ((n - 1 - v[v.size() - 1]) <= k) naive--;
  }
  printf("%d", naive);
  return 0;
}
