#include <bits/stdc++.h>
using namespace std;
int tree[200005], n;
void update(int x, int val) {
  while (x <= n + 1) {
    tree[x] += val;
    x += (x & -x);
  }
}
int read(int x) {
  int sum = 0;
  while (x > 0) {
    sum += tree[x];
    x -= (x & -x);
  }
  return sum;
}
int main() {
  int k;
  cin >> n >> k;
  int need = 0;
  vector<int> v;
  set<pair<int, pair<int, int>>> idx;
  for (int i = (int)(1); i <= (int)(n); i++) {
    int x;
    cin >> x;
    if (x < 0) {
      need++;
      update(i, +1);
      update(i + 1, -1);
      if (!v.empty()) idx.insert({i - v.back() - 1, {v.back() + 1, i - 1}});
      v.push_back(i);
    }
  }
  if (need > k) {
    cout << -1;
    return 0;
  }
  int left = k - need;
  while (!idx.empty() && left > 0) {
    int req = idx.begin()->first;
    int l = idx.begin()->second.first;
    int r = idx.begin()->second.second;
    if (req > left) break;
    idx.erase(idx.begin());
    left -= req;
    update(l, +1);
    update(r + 1, -1);
  }
  bool cur = 0;
  int ans = 0;
  cerr << "[DEBUG] "
       << "left"
       << " = " << left << endl;
  ;
  for (int i = (int)(1); i <= (int)(n); i++) {
    int r = read(i);
    if (r > 0 && !cur) {
      cur = 1;
      ans++;
    } else if (r <= 0 && cur) {
      cur = 0;
      ans++;
    }
    if (!v.empty() && i == v.back()) {
      if (left >= n - i) break;
    }
  }
  cout << ans;
}
