#include <bits/stdc++.h>
using namespace std;
long long ar[200005];
vector<long long> diff;
long long n, k, cnt, ans;
int main() {
  cin >> n >> k;
  for (int i = 0; i < n; i++) {
    cin >> ar[i];
    cnt += (ar[i] < 0);
  }
  if (!cnt) {
    cout << 0 << endl;
    return 0;
  }
  if (cnt > k) {
    cout << -1 << endl;
    return 0;
  }
  k -= cnt;
  int prev = -1;
  for (int i = 0; i < n; i++) {
    if (ar[i] < 0) {
      if (prev != -1 && prev != i - 1) {
        diff.push_back(i - prev - 1);
      }
      prev = i;
    }
  }
  sort(diff.begin(), diff.end());
  ans = (diff.size() + 1) * 2;
  for (int i = 0; i < diff.size() && k >= diff[i]; i++) {
    k -= diff[i];
    ans -= 2;
  }
  long long t = n - prev - 1;
  if (t <= k) ans--;
  cout << ans << endl;
  return 0;
}
