#include <bits/stdc++.h>
using namespace std;
const int maxn = 200005;
int add[maxn];
int section[maxn];
int main() {
  int n, k;
  cin >> n >> k;
  int a, fu = 0;
  for (int i = 0; i < n; i++) {
    cin >> a;
    if (a < 0) add[fu++] = i;
  }
  if (fu > k) {
    cout << -1 << endl;
    return 0;
  }
  if (fu == 0) {
    cout << 0 << endl;
    return 0;
  }
  int ans = fu * 2;
  add[fu] = n;
  k -= fu;
  for (int i = 0; i < fu; i++) section[i] = add[i + 1] - add[i] - 1;
  sort(section, section + fu - 1);
  for (int i = 0; i < fu - 1; i++)
    if (section[i] <= k) {
      k -= section[i];
      ans -= 2;
    }
  if (section[fu - 1] <= k) k--, ans--;
  cout << ans << endl;
  return 0;
}
