#include <bits/stdc++.h>
using namespace std;
long long mod = 1000000007;
long long INF = 1e18;
int32_t main() {
  ios::sync_with_stdio(false);
  cin.tie(nullptr);
  long long n, k;
  cin >> n >> k;
  vector<bool> negative;
  long long cnt = 0;
  for (long long i = 0; i < n; i++) {
    long long x;
    cin >> x;
    if (negative.size() == 0 && x >= 0) continue;
    negative.push_back(x < 0);
    cnt += x < 0;
  }
  if (cnt > k) {
    cout << -1 << '\n';
    return 0;
  }
  k -= cnt;
  n = negative.size();
  long long ans = 1;
  set<pair<long long, long long> > s;
  cnt = 0;
  long long x = 1;
  for (long long i = 1; i < n; i++) {
    if (negative[i] != negative[i - 1]) ans++;
    if (!negative[i])
      cnt++;
    else if (cnt > 0) {
      s.insert(make_pair(cnt, x++));
      cnt = 0;
    }
  }
  while (s.size() && k - (*s.begin()).first >= 0) {
    pair<long long, long long> p = (*s.begin());
    k -= p.first;
    ans -= 2;
    s.erase(s.begin());
  }
  if (cnt > 0 && k >= cnt) ans--;
  if (n == 0) ans = 0;
  cout << ans << '\n';
  return 0;
}
