#include <bits/stdc++.h>
using namespace std;
int a[200005];
vector<int> b, c;
int main() {
  int n, k, num = 0, ans = 0;
  cin >> n >> k;
  for (int i = 1; i <= n; i++) {
    cin >> a[i];
    if (a[i] < 0) num++, b.push_back(i);
  }
  if (k < num) {
    cout << -1 << endl;
    return 0;
  }
  int now = 0;
  for (int i = 1; i <= n; i++) {
    if (a[i] >= 0 && now == 1) {
      ans++;
      now = 0;
      continue;
    }
    if (a[i] < 0 && now == 0) {
      ans++;
      now = 1;
      continue;
    }
  }
  k -= num;
  if (k == 0) {
    cout << ans << endl;
    return 0;
  }
  for (int i = 1; i < b.size(); i++) {
    c.push_back(b[i] - b[i - 1]);
  }
  sort(c.begin(), c.end());
  for (int i = 0; i < c.size(); i++) {
    if (c[i] - 1 == 0) continue;
    if (k >= c[i] - 1) k -= c[i] - 1, ans -= 2;
  }
  if (k > 0 && num > 0 && n - b[num - 1] > 0 && n - b[num - 1] <= k) ans--;
  cout << ans << endl;
}
