#include <bits/stdc++.h>
int n, k;
int count;
int x;
std::vector<int> negTemps;
std::priority_queue<int, std::vector<int>, std::greater<int> > intervals;
int main(void) {
  scanf(" %d %d", &n, &k);
  for (int i = 0; i <= n - 1; ++i) {
    scanf(" %d", &x);
    if (x < 0) {
      negTemps.push_back(i);
    }
  }
  if (!negTemps.size()) {
    printf("0\n");
    return 0;
  }
  if (k < negTemps.size()) {
    printf("-1\n");
    return 0;
  }
  int count = negTemps.size() << 1;
  int rem = k - negTemps.size();
  auto it1 = negTemps.begin();
  auto it2 = it1 + 1;
  while (it2 != negTemps.end()) {
    intervals.push(*it2 - 1 - *it1);
    ++it1;
    ++it2;
  }
  while (intervals.size() && intervals.top() <= rem) {
    count -= 2;
    rem -= intervals.top();
    intervals.pop();
  }
  if (n - *it1 - 1 <= rem) --count;
  printf("%d\n", count);
  return 0;
}
