#include <bits/stdc++.h>
using namespace std;
int block = 400;
const long double eps = 1e-7;
const long long pe = 137;
const long long pe2 = 1181;
const long long N = 1e6 + 200;
const long long mod = 1e9 + 7;
const long long cmod = 998244353;
const long long INF = 1e16;
int n, k, a[N];
int main() {
  cin >> n >> k;
  for (int i = 1; i <= n; i++) {
    cin >> a[i];
  }
  for (int i = 1; i <= n; i++) {
    if (a[i] < 0) k--;
  }
  if (k < 0) {
    cout << -1;
    return 0;
  }
  vector<int> v;
  int ans = 0, last = -1;
  for (int i = 1; i <= n; i++) {
    if (a[i] < 0 && last == -1) {
      last = 0;
      ans++;
    } else if (a[i] >= 0) {
      ans += (last == 0), last = -1;
    }
  }
  ans += (last == 0);
  if (ans == 0) {
    cout << ans;
    return 0;
  }
  last = -1;
  for (int i = 1; i <= n; i++) {
    if (a[i] < 0) {
      if (last != -1 && last != i - 1) {
        v.push_back(i - last - 1);
      }
      last = i;
    }
  }
  sort(v.begin(), v.end());
  for (int i = 0; i < v.size(); i++) {
    if (k >= v[i]) {
      k -= v[i];
      ans -= 2;
    }
  }
  if (k >= n - last) {
    ans--;
  }
  cout << ans;
}
