#include <bits/stdc++.h>
using namespace std;
int t[200010] = {0};
int a[2000010] = {0};
int main() {
  int k, n;
  scanf("%d %d", &n, &k);
  int rst = 0;
  int id = 0;
  int huan = 0;
  for (int i = 1; i <= n; i++) {
    scanf("%d", &t[i]);
    if (t[i - 1] >= 0 && t[i] < 0) {
      huan++;
    }
    if (t[i - 1] < 0 && t[i] >= 0) {
      huan++;
    }
    if (t[i] < 0) rst++;
    if (t[i - 1] >= 0 && t[i] >= 0) {
      a[id]++;
    } else if (t[i] >= 0) {
      a[++id]++;
    }
  }
  if (t[n] < 0) {
    id++;
    a[id] = 1e7;
  }
  if (rst == 0) {
    printf("0\n");
    return 0;
  }
  if (k - rst >= 0 && id == 0) {
    printf("1\n");
    return 0;
  } else if (id == 0) {
    printf("-1\n");
    return 0;
  }
  sort(a + 1, a + id);
  k -= rst;
  if (k < 0) {
    printf("-1");
    return 0;
  }
  int tmpk = k;
  int tmph = huan;
  for (int i = 1; i < id; i++) {
    k -= a[i];
    if (k < 0) break;
    if (a[i]) {
      huan -= 2;
    }
  }
  k = tmpk;
  k -= a[id];
  if (k >= 0) {
    tmph -= 1;
    for (int i = 1; i < id; i++) {
      k -= a[i];
      if (k < 0) break;
      if (a[i]) {
        tmph -= 2;
      }
    }
  }
  printf("%d", min(huan, tmph));
  scanf("%d %d", &n, &k);
  return 0;
}
