#include <bits/stdc++.h>
using namespace std;
const int maxn = 2e5 + 7;
int n, k;
int a[maxn];
int sum;
vector<int> v;
bool check(int i) {
  if (a[i] >= 0 && a[i - 1] >= 0)
    return true;
  else if (a[i] < 0 && a[i - 1] < 0)
    return true;
  else
    return false;
}
int main() {
  scanf("%d%d", &n, &k);
  for (int i = 1; i <= n; i++) {
    scanf("%d", &a[i]);
    if (a[i] < 0) sum++;
  }
  if (sum > k)
    printf("-1\n");
  else {
    if (sum == 0) {
      printf("0\n");
      return 0;
    }
    k -= sum;
    int bef = 0;
    for (int i = 1; i <= n; i++) {
      if (a[i] < 0) {
        if ((i == 1 || !check(i)) && bef != 0) v.push_back(i - bef - 1);
        bef = i;
      }
    }
    sort(v.begin(), v.end());
    bef = n - bef;
    int ans = v.size() * 2 + 2;
    int res = ans;
    for (int i = 0; i < v.size(); i++) {
      if (k >= v[i]) res -= 2, k -= v[i];
      ans = min(ans, res);
      if (k >= bef) ans = min(ans, res - 1);
    }
    if (k >= bef) ans = min(ans, res - 1);
    printf("%d\n", ans);
  }
  return 0;
}
