#include <bits/stdc++.h>
using namespace std;
int main() {
  int n, k, neg = 0;
  cin >> n >> k;
  int d[200020], b[200020];
  for (int i = 1; i <= n; i++) {
    cin >> d[i];
    if (d[i] < 0) {
      b[++neg] = i;
    }
  }
  if (neg > k) {
    cout << -1 << endl;
    return 0;
  }
  if (neg == 0) {
    cout << 0 << endl;
    return 0;
  }
  k -= neg;
  vector<int> positive;
  for (int i = 1; i <= neg - 1; i++) positive.push_back(b[i + 1] - b[i] - 1);
  sort((positive).begin(), (positive).end());
  int maxAns = 2 * neg;
  for (auto val : positive) {
    if (val <= k) {
      k -= val;
      maxAns -= 2;
    } else {
      break;
    }
  }
  if (n - b[neg] <= k) maxAns--;
  cout << maxAns << endl;
}
