#include <bits/stdc++.h>
using namespace std;
const int maxn = 2e5 + 7;
int n, c[maxn], b[maxn], n1, res, k, t[maxn];
int main() {
  cin >> n >> k;
  for (int i = 1; i <= n; ++i) {
    scanf("%d", t + i);
    if (t[i] < 0) b[++n1] = i;
  }
  if (n1 > k) {
    cout << -1;
    return 0;
  }
  if (n1 == 0) {
    cout << 0;
    return 0;
  }
  k -= n1;
  res = n1 * 2;
  for (int i = 1; i < n1; ++i) c[i] = b[i + 1] - b[i] - 1;
  sort(c + 1, c + n1);
  for (int i = 1; i < n1; ++i)
    if (k >= c[i]) res -= 2, k -= c[i];
  if (n + 1 - b[n1] - 1 <= k) res--;
  cout << res;
  return 0;
}
