#include <bits/stdc++.h>
int cmp(const void* a, const void* b) { return *(int*)a - *(int*)b; }
int main() {
  int j, x, p, z, temp, n, k, t[200010], a[200010], l = 0, i, count = 0;
  scanf("%d%d", &n, &k);
  for (i = 1; i <= n; i++) {
    scanf("%d", &t[i]);
    if (t[i] < 0) k--;
  }
  if (k < 0)
    printf("-1\n");
  else {
    for (i = 1; i <= n; i++)
      if (t[i] < 0) break;
    if (i == n + 1)
      printf("0\n");
    else {
      x = 0;
      l = 0;
      while (i <= n) {
        for (; i <= n; i++)
          if (t[i] >= 0) break;
        j = i;
        for (; i <= n; i++)
          if (t[i] < 0) break;
        if (i == n + 1)
          x = i - j;
        else
          a[l++] = i - j;
      }
      qsort(a, l, sizeof(int), cmp);
      count = 0;
      for (i = 0; i < l; i++) {
        count += a[i];
        if (count > k) break;
      }
      temp = l;
      l = l - i;
      if (x <= 0)
        printf("%d\n", 2 * l + 1);
      else if (x > 0 && k < x)
        printf("%d\n", 2 * (l + 1));
      else {
        z = 2 * (l + 1);
        k -= x;
        count = 0;
        for (i = 0; i < temp; i++) {
          count += a[i];
          if (count > k) break;
        }
        temp = temp - i;
        p = 2 * temp + 1;
        if (p < z)
          printf("%d\n", p);
        else
          printf("%d\n", z);
      }
    }
  }
  return 0;
}
