#include <bits/stdc++.h>
using namespace std;
const int inf = (int)1e9;
const int mod = inf + 7;
const double eps = 1e-9;
const double pi = acos(-1.0);
int n, k;
int t[200200];
int get(int val) {
  if (val < 0) return -1;
  return 1;
}
int get(int pos, int type) {
  while (pos < n && get(t[pos]) == type) pos++;
  return pos;
}
int main() {
  cin >> n >> k;
  int c = 0;
  for (int i = 0; i < n; i++) {
    cin >> t[i];
    if (t[i] < 0) c++;
  }
  if (c > k) {
    cout << -1;
    return 0;
  }
  int p = 0;
  while (p < n && t[p] >= 0) p++;
  if (p == n) {
    cout << 0;
    return 0;
  }
  if (k >= n - p) {
    cout << 1;
    return 0;
  }
  vector<int> v;
  while (p < n) {
    int st = p;
    if (t[p] < 0)
      p = get(p, -1);
    else
      p = get(p, 1);
    if (t[st] < 0)
      v.push_back(-1);
    else
      v.push_back(p - st);
  }
  if (v.back() == -1) v.push_back(0);
  int ans = v.size();
  vector<int> a;
  for (int i = 0; i < int(v.size()) - 1; i++)
    if (v[i] != -1) a.push_back(v[i]);
  sort(a.begin(), a.end());
  k -= c;
  int res1 = ans;
  int val = k;
  for (int i = 0; i < a.size(); i++) {
    if (val < a[i]) break;
    val -= a[i];
    res1 -= 2;
  }
  int res2 = ans;
  val = k - v.back();
  if (val >= 0)
    res2 = ans - 1;
  else
    res2 = inf;
  for (int i = 0; i < a.size(); i++) {
    if (val < a[i]) break;
    val -= a[i];
    res2 -= 2;
  }
  ans = min(ans, res1);
  ans = min(ans, res2);
  cout << ans;
  return 0;
}
