#include <bits/stdc++.h>
using namespace std;
int a[200005];
pair<int, int> b[200005];
int main() {
  int cases, caseno = 0, n, i, j, k, cnt, sum;
  scanf("%d", &n);
  scanf("%d", &k);
  for (i = 1; i <= n; i++) scanf("%d", &a[i]);
  cnt = 0;
  for (i = 1; i <= n; i++) {
    if (a[i] < 0) cnt++;
  }
  if (cnt > k) {
    printf("-1\n");
    return 0;
  }
  k -= cnt;
  int last = 0;
  int tire = 0;
  int sz = 0;
  for (i = 1; i <= n; i++) {
    if (a[i] >= 0 && tire == 1) {
      tire = 0;
      last = i;
    } else if (a[i] < 0 && tire == 0) {
      if (last > 0) {
        b[sz++] = make_pair(i - last, last);
      }
      tire = 1;
    }
  }
  sort(b, b + sz);
  cnt = 0;
  for (i = 0; i <= sz - 1; i++) {
    if (cnt + b[i].first <= k) {
      cnt += b[i].first;
      for (j = 0; j <= b[i].first - 1; j++) a[b[i].second + j] = -1;
    }
  }
  if (last > 0 && tire == 0 && cnt + n - last + 1 <= k) {
    for (i = last; i <= n; i++) a[i] = -1;
  }
  cnt = 0;
  tire = 0;
  for (i = 1; i <= n; i++) {
    if (a[i] >= 0 && tire == 1) {
      tire = 0;
      cnt++;
    } else if (a[i] < 0 && tire == 0) {
      tire = 1;
      cnt++;
    }
  }
  printf("%d\n", cnt);
  return 0;
}
