#include <bits/stdc++.h>
using namespace std;
int n, k, a, b, cnt_negative, cnt_negative_tmp, res, res_tmp;
vector<pair<int, int> > arr;
vector<int> segs;
int main() {
  scanf("%d %d", &n, &k);
  for (int i = 0; i < n; ++i) {
    scanf("%d", &b);
    if (b < 0 && a >= 0) arr.push_back(pair<int, int>(i, i));
    if (b < 0) {
      arr.back().second = i;
      ++cnt_negative;
    }
    a = b;
  }
  if (cnt_negative == 0) {
    printf("0");
    return 0;
  }
  if (cnt_negative > k) {
    printf("-1");
    return 0;
  }
  res = (arr.size() << 1);
  if (arr.back().second == n - 1) --res;
  res_tmp = res;
  cnt_negative_tmp = cnt_negative;
  for (int i = 1; i < arr.size(); ++i)
    segs.push_back(arr[i].first - arr[i - 1].second - 1);
  sort(segs.begin(), segs.end());
  for (int i = 0; i < segs.size() && cnt_negative + segs[i] <= k; ++i) {
    res -= 2;
    cnt_negative += segs[i];
  }
  if (arr.back().second < n - 1 &&
      cnt_negative_tmp + n - 1 - arr.back().second <= k) {
    --res_tmp;
    cnt_negative_tmp += n - 1 - arr.back().second;
    for (int i = 0; i < segs.size() && cnt_negative_tmp + segs[i] <= k; ++i) {
      res_tmp -= 2;
      cnt_negative_tmp += segs[i];
    }
    res = min(res, res_tmp);
  }
  printf("%d", res);
  return 0;
}
