#include <bits/stdc++.h>
using namespace std;
const int ms = 111111;
priority_queue<int, vector<int>, greater<int> > av;
int main() {
  ios::sync_with_stdio(0);
  int n, k;
  cin >> n >> k;
  int c = 0, iv = 0;
  bool fs = 0;
  for (int i = 0, __ = n; i < __; ++i) {
    int a;
    cin >> a;
    if (a < 0) fs = 1;
    if (!fs) continue;
    if (a < 0) {
      ++iv;
      if (c) {
        av.push(c);
      }
      c = 0;
    } else {
      ++c;
    }
  }
  if (iv > k) {
    puts("-1");
    return 0;
  }
  if (!fs) {
    puts("0");
    return 0;
  }
  k -= iv;
  while (!av.empty() && k >= av.top()) {
    k -= av.top();
    av.pop();
  }
  if (k >= c) {
    c = 0;
  }
  cout << 1 + (c > 0) + 2 * av.size() << endl;
  return 0;
}
