#include <bits/stdc++.h>
using namespace std;
int n, k;
int t[200005];
vector<int> v;
int main() {
  cin >> n >> k;
  for (int i = 0; i < n; i++) {
    int x;
    cin >> x;
    if (x >= 0)
      t[i] = 1;
    else
      t[i] = -1;
  }
  int s = 0;
  for (int i = 0; i < n; i++) {
    if (t[i] < 0) {
      s = i;
      break;
    }
  }
  bool summer = false;
  int a = -1;
  for (int i = s + 1; i < n; i++) {
    if (summer) {
      if (t[i] < 0) {
        v.push_back(i - a);
        summer = false;
      }
    } else {
      if (t[i] > 0) {
        a = i;
        summer = true;
      }
    }
  }
  int single = -1;
  if (summer) {
    single = n - a;
  }
  sort(v.begin(), v.end());
  int numw = 0;
  for (int i = 0; i < n; i++) {
    if (t[i] < 0) numw++;
  }
  int mx = k - numw;
  if (mx < 0) {
    cout << -1 << "\n";
    return 0;
  }
  int numc = 0;
  if (t[0] < 0) numc++;
  for (int i = 1; i < n; i++) {
    if (t[i] != t[i - 1]) numc++;
  }
  int curr1 = 0;
  int ans1 = 0;
  for (int i = 0; i < v.size(); i++) {
    if (v[i] + curr1 <= mx) {
      curr1 += v[i];
      ans1 += 2;
    } else
      break;
  }
  int curr2;
  int ans2 = -1;
  if (single != -1 && single <= mx) {
    curr2 = single;
    ans2 = 1;
    for (int i = 0; i < v.size(); i++) {
      if (v[i] + curr2 <= mx) {
        curr2 += v[i];
        ans2 += 2;
      }
    }
  }
  cout << max(0, numc - max(ans1, ans2)) << "\n";
}
