#include <bits/stdc++.h>
using namespace std;
int dp[200001][2];
void solve() {
  int n, k;
  cin >> n >> k;
  vector<int> all(n);
  for (int i = 0; i < n; i++) cin >> all[i];
  vector<int> cnt;
  bool otr = 0;
  int ans = 0;
  int now = 0;
  int bd = 0;
  for (int i = 0; i < n; i++) {
    if (all[i] >= 0 && otr == 0) continue;
    if (otr == 0 && all[i] < 0) {
      otr = 1;
      ans++;
      bd++;
      continue;
    }
    if (all[i] >= 0 && all[i - 1] >= 0) {
      now++;
      continue;
    }
    if (all[i] >= 0 && all[i - 1] < 0) {
      ans++;
      now = 1;
      continue;
    }
    if (all[i] < 0 && all[i - 1] < 0) {
      bd++;
      continue;
    }
    if (all[i] < 0 && all[i - 1] >= 0) {
      ans++;
      bd++;
      cnt.push_back(now);
      now = 0;
    }
  }
  if (bd > k) {
    cout << -1;
    return;
  }
  sort(begin(cnt), end(cnt));
  k -= bd;
  for (int i = 0; i < cnt.size(); i++) {
    if (k >= cnt[i]) {
      k -= cnt[i];
      ans -= 2;
    }
  }
  if (k >= now && now) ans--;
  cout << ans;
}
int main() {
  ios_base::sync_with_stdio(0);
  cin.tie(0);
  cout.tie(0);
  int t;
  t = 1;
  while (t) {
    t--;
    solve();
  }
}
