#include <bits/stdc++.h>
using namespace std;
const int N = 1e6 + 10;
const int NN = 20;
const int INF = 1e9 + 7;
int n, k;
int t[N];
int ans;
int cnt_day;
vector<pair<int, int> > v;
int main() {
  scanf("%d%d", &n, &k);
  for (int i = 0; i < n; i++) {
    scanf("%d", &t[i]);
    if (t[i] < 0) {
      cnt_day++;
    }
  }
  int cnt = 0;
  if (cnt_day > 0) {
    cnt++;
  }
  if (cnt_day == 0) {
    cout << 0;
    return 0;
  }
  if (k < cnt_day) {
    cout << -1;
    return 0;
  }
  int have = k - cnt_day;
  int last = -1;
  n++;
  t[n - 1] = -6;
  for (int i = 0; i < n; i++) {
    if (t[i] < 0) {
      if (last != -1 && i != n - 1) {
        v.push_back({i - last - 1, i});
      }
      if (i == n - 1) {
        break;
      }
      last = i;
    }
  }
  sort(v.begin(), v.end());
  for (int i = 0; i < v.size(); i++) {
    if (v[i].first <= have) {
      have -= v[i].first;
      continue;
    } else {
      if (v[i].second == n - 1) {
        cnt++;
        continue;
      }
      cnt += 2;
    }
  }
  if (last != n - 2 && n - 1 - last - 1 > have) {
    cnt++;
  }
  cout << cnt;
  return 0;
}
