#include <bits/stdc++.h>
using namespace std;
int main() {
  ios_base::sync_with_stdio(false);
  cin.tie(NULL);
  long long int n, k;
  cin >> n >> k;
  vector<long long int> ar, neg;
  long long int temp;
  bool f = 1;
  for (int i = 0; i < n; i++) {
    cin >> temp;
    if (f) {
      if (temp < 0) {
        f = 0;
        ar.push_back(temp);
        neg.push_back(i);
      }
      continue;
    }
    if (temp < 0) neg.push_back(i);
    ar.push_back(temp);
  }
  if (neg.size() == 0) {
    cout << "0" << endl;
    return 0;
  }
  k -= neg.size();
  if (k < 0) {
    cout << -1 << endl;
    return 0;
  }
  vector<long long int> diff;
  for (int i = 0; i < neg.size() - 1; i++) {
    diff.push_back(neg[i + 1] - neg[i] - 1);
  }
  sort(diff.begin(), diff.end());
  long long int ans = 2 * (neg.size());
  for (int i = 0; i < diff.size(); i++) {
    if (k >= diff[i]) {
      k -= diff[i];
      ans -= 2;
    }
  }
  if (k >= (n - neg[neg.size() - 1] - 1)) ans--;
  cout << ans << endl;
}
