#include <bits/stdc++.h>
using namespace std;
const int MAX = 2e5 + 7;
int n, c[MAX], b[MAX], t[MAX], cnt, res, k;
int main() {
  scanf("%d %d", &n, &k);
  for (int i = 0; i < n; i++) {
    scanf("%d", &t[i]);
    if (t[i] < 0) b[cnt++] = i;
  }
  if (cnt > k)
    puts("-1");
  else if (cnt == 0)
    puts("0");
  else {
    k -= cnt, res = cnt * 2;
    cnt--;
    for (int i = 0; i < cnt; i++) c[i] = b[i + 1] - b[i] - 1;
    sort(c, c + cnt);
    for (int i = 0; i < cnt; i++)
      if (k >= c[i]) res -= 2, k -= c[i];
    if (n - b[cnt] - 1 <= k) res--;
    printf("%d", res);
  }
}
