#include <bits/stdc++.h>
using namespace std;
using ll = long long;
const int MONKE = 0;
int main() {
  int n, k;
  cin >> n >> k;
  vector<int> v(n);
  int total = 0;
  for (auto &e : v) {
    cin >> e;
    if (e < 0) total++;
  }
  if (total > k) {
    cout << -1;
    return 0;
  }
  if (total == 0) {
    cout << 0;
    return 0;
  }
  int prothom = -1;
  for (int i = 0; i < n; i++) {
    if (v[i] < 0) {
      prothom = i;
      break;
    }
  }
  int koyta = 0;
  priority_queue<int> intervals;
  for (int i = prothom; i < n; i++) {
    if (v[i] >= 0)
      koyta++;
    else if (koyta > 0) {
      intervals.push(koyta);
      koyta = 0;
    }
  }
  int mark = -1;
  if (koyta > 0) {
    mark = koyta;
    intervals.push(koyta);
  }
  int mot = n - prothom, ans = 1;
  while (mot > k) {
    if (mot - mark <= k) {
      ans++;
      break;
    }
    int upor = intervals.top();
    intervals.pop();
    mot -= upor;
    ans += 2;
    if (upor == mark) {
      ans--;
      mark = -1;
    }
    {};
  }
  cout << ans;
  return MONKE;
}
