#include <bits/stdc++.h>
using namespace std;
const int N = 2e5 + 100;
int main() {
  int n, k;
  int no[N];
  int ne[N];
  int win;
  int cnt;
  int i, j;
  bool f;
  int len;
  int t;
  int ans;
  int l;
  int q;
  while (scanf("%d%d", &n, &k) == 2) {
    win = 0;
    cnt = 0;
    ans = 0;
    l = 0;
    f = true;
    for (i = 0; i < n; i++) {
      scanf("%d", &no[i]);
      if (no[i] < 0) {
        win++;
      }
    }
    if (win > k) {
      printf("-1\n");
      continue;
    }
    if (n == 1) {
      if (no[0] < 0)
        printf("1\n");
      else
        printf("0\n");
      continue;
    }
    for (i = n - 1; i >= 0; i--) {
      if (no[i] >= 0) {
        l++;
      } else {
        if (i < n - 1) ans++;
        break;
      }
    }
    q = n - l;
    for (i = 0; i < n; i++) {
      if (no[i] < 0) {
        ans++;
        f = false;
        break;
      }
    }
    for (j = 0; i < q; i++) {
      if (no[i] >= 0 && f == true) {
        cnt++;
      } else if (no[i] < 0 && f == false) {
        cnt--;
      } else if (no[i] >= 0 && f == false) {
        ans++;
        ne[j] = cnt;
        cnt = 1;
        f = true;
        j++;
      } else if (no[i] < 0 && f == true) {
        ans++;
        ne[j] = cnt;
        cnt = -1;
        f = false;
        j++;
      }
    }
    ne[j] = cnt;
    len = j + 1;
    t = k - win;
    sort(ne, ne + len);
    for (int i = 0; i < len; i++) {
      if (ne[i] < 0) continue;
      if (t - ne[i] >= 0 && ne[i]) {
        t -= ne[i];
        ans -= 2;
      }
    }
    if (l > 0 && t >= l && win) ans--;
    printf("%d\n", ans);
  }
  return 0;
}
