#include <bits/stdc++.h>
using namespace std;
const int maxn = 3e5;
int tem[maxn];
vector<int> v;
int main() {
  ios::sync_with_stdio(false);
  int n, k;
  cin >> n >> k;
  bool flag = true;
  int cnt = 0;
  for (int i = 1; i <= n; ++i) {
    cin >> tem[i];
    if (tem[i] < 0)
      ++cnt, tem[i] = 0;
    else
      tem[i] = 1;
    if (cnt > k) flag = false;
  }
  if (!flag) {
    cout << -1 << endl;
    return 0;
  }
  k -= cnt;
  int ind = 0;
  int change = 0;
  for (int i = 1; i <= n; ++i) {
    if (ind && !tem[i]) {
      v.push_back(i - ind - 1);
      ++change;
      while (i <= n && !tem[i]) ++i;
      ind = i - 1;
    } else if (ind == 0 && !tem[i]) {
      ++change;
      while (i <= n && !tem[i]) ++i;
      ind = i - 1;
    } else {
      if (i > 1) ++change;
      while (i <= n && tem[i]) ++i;
    }
    if (i == n + 1)
      break;
    else
      --i;
  }
  sort(v.begin(), v.end());
  int len = v.size();
  for (int i = 0; i < len; ++i) {
    if (k >= v[i])
      k -= v[i];
    else
      break;
    change -= 2;
  }
  if (ind && ind != n && n - ind <= k) --change;
  cout << change << endl;
  return 0;
}
