#include <bits/stdc++.h>
using namespace std;
const int MAXN = 200010;
int b[MAXN], c[MAXN], i;
int main() {
  int n, k, cnt = 0, res = 0;
  cin >> n >> k;
  for (i = 0; i < n; i++) {
    int x;
    cin >> x;
    if (x < 0) b[cnt++] = i;
  }
  if (k < cnt) return cout << -1, 0;
  if (cnt == 0) return cout << 0, 0;
  k -= cnt;
  res = cnt * 2;
  for (i = 0; i < cnt - 1; i++) c[i] = b[i + 1] - b[i] - 1;
  sort(c, c + cnt - 1);
  for (i = 0; i < cnt - 1; i++)
    if (k >= c[i]) k -= c[i], res -= 2;
  if (k >= n - b[cnt - 1] - 1) res--;
  cout << res << endl;
  return 0;
}
