#include <bits/stdc++.h>
using namespace std;
const int MAXN = 200005;
int N, K;
int T[MAXN];
bool winter[MAXN];
int main() {
  ios::sync_with_stdio(0);
  cin >> N >> K;
  int numneg = 0;
  for (int i = 1; i <= N; i++) {
    cin >> T[i];
    if (T[i] < 0) {
      numneg++;
      winter[i] = true;
    }
  }
  if (numneg > K) {
    cout << "-1\n";
    return 0;
  }
  priority_queue<pair<int, int> > pq;
  for (int i = 1; i <= N;) {
    if (winter[i] || !winter[i - 1]) {
      i++;
      continue;
    }
    int j = i;
    while (j <= N && !winter[j]) j++;
    if (j <= N) pq.push(make_pair(-(j - i), i));
    i = j;
  }
  while (!pq.empty() && -pq.top().first + numneg <= K) {
    int len = -pq.top().first, idx = pq.top().second;
    pq.pop();
    for (int i = idx; i < idx + len; i++) winter[i] = true;
    numneg += len;
  }
  int lastwin = 0;
  for (int i = 1; i <= N; i++)
    if (winter[i]) lastwin = i;
  if (lastwin != 0 && numneg + N - lastwin <= K) {
    for (int i = lastwin + 1; i <= N; i++) winter[i] = true;
    numneg += N - lastwin;
  }
  int ans = 0;
  for (int i = 0; i < N; i++) ans += (winter[i] != winter[i + 1]);
  cout << ans << "\n";
  return 0;
}
