#include <bits/stdc++.h>
using namespace std;
int n, k, a[200000], sum, last, num;
bool f, s;
multiset<int> x;
int main() {
  scanf("%d%d", &n, &k);
  for (int i = 0; i < n; i++) {
    scanf("%d", &a[i]);
    if (a[i] < 0) sum++;
    if (f && a[i] >= 0) {
      f = 0;
      last = i;
    } else if (!f && a[i] < 0) {
      if (s) x.insert(i - last);
      f = s = 1;
    }
  }
  if (f) last = n;
  num = x.size() + 1;
  if (sum > k)
    printf("-1");
  else if (sum == 0)
    printf("0");
  else {
    int sum2 = k - sum, c = 0;
    while (x.size() && (*x.begin()) <= sum2) {
      sum2 -= (*x.begin());
      x.erase(x.begin());
      c++;
    }
    if (n - last <= sum2)
      printf("%d", (num - c) * 2 - 1);
    else
      printf("%d", (num - c) * 2);
  }
}
