#include <bits/stdc++.h>
using namespace std;
int i, j, t, n, m, l, r, k, z, y, x;
int a[200005], b[200005];
int main() {
  scanf("%d%d", &n, &k);
  x = m = 0;
  for (t = 0, i = 1; i <= n; i++) {
    scanf("%d", &a[i]);
    if (a[i] < 0) x++;
  }
  if (x == 0) {
    printf("0\n");
    return 0;
  }
  if (x > k) {
    printf("-1\n");
    return 0;
  }
  for (i = 1; i <= n; i++)
    if (a[i] < 0) break;
  for (t = i, i += 1; i <= n; i++)
    if (a[i] < 0) {
      b[++m] = i - t - 1;
      t = i;
    }
  k -= x;
  x *= 2;
  sort(b + 1, b + m + 1);
  t = n - t;
  for (i = 1; i <= m; i++) {
    if (b[i] <= k) {
      k -= b[i];
      x -= 2;
    } else
      break;
  }
  if (t <= k) {
    k -= t;
    x--;
  }
  printf("%d\n", x);
  return 0;
}
