#include <bits/stdc++.h>
using namespace std;
int main() {
  ios_base::sync_with_stdio(false);
  int n, m, l = 0, f = 1, s;
  vector<int> a, b, c;
  cin >> n >> m;
  a.resize(n);
  for (int i = 0; i < n; i++) {
    cin >> a[i];
    if (a[i] < 0) l++;
  }
  if (m < l) {
    cout << -1;
    return 0;
  }
  for (int i = 0; i < n; i++) {
    if (a[i] < 0 && f) {
      f = 0;
      b.push_back(i);
    } else if (a[i] >= 0 && !f) {
      f = 1;
      b.push_back(i);
    }
  }
  m -= l;
  s = b.size();
  for (int i = 1; i + 1 < b.size(); i += 2) c.push_back(b[i + 1] - b[i]);
  if (c.size()) sort(c.begin(), c.end());
  for (int i = 0; i < c.size(); i++)
    if (c[i] <= m) {
      m -= c[i];
      s -= 2;
    }
  if (b.size() && a[a.size() - 1] >= 0 && m >= n - b[b.size() - 1]) s--;
  cout << s;
  return 0;
}
