#include <bits/stdc++.h>
using namespace std;
int a[200005];
list<int>* adj = new list<int>[10005];
int main(int argv, char** args) {
  long long int n, k, i, last = -1, win = 0, ans;
  std::vector<int> v;
  cin >> n >> k;
  for (i = 0; i < n; i++) {
    cin >> a[i];
    if (a[i] < 0) win++;
  }
  if (win > k) {
    cout << -1;
    return 0;
  }
  ans = 2 * win;
  k = k - win;
  for (i = 0; i < n; i++) {
    if (a[i] < 0) {
      if (last != -1) {
        v.push_back(i - last - 1);
      }
      last = i;
    }
  }
  last = (n - 1) - last;
  sort(v.begin(), v.end());
  for (i = 0; i < v.size(); i++) {
    if (v[i] <= k) {
      k = k - v[i];
      ans = ans - 2;
    } else
      break;
  }
  if (k >= last && ans > 0) ans--;
  cout << ans << endl;
}
