#include <bits/stdc++.h>
using namespace std;
int n, k, temp[200005], mi;
struct info {
  int L, R, flag;
  info(int a, int b, int c) { L = a, R = b, flag = c; }
  bool operator<(const info &i) const {
    if (flag != i.flag) return flag < i.flag;
    if (R - L != i.R - i.L) {
      return R - L < i.R - i.L;
    }
    return L < i.L;
  }
};
vector<info> v;
int main() {
  scanf("%d %d", &n, &k);
  for (int i = 1; i <= n; i++) {
    scanf("%d", &temp[i]);
    if (temp[i] == 0) temp[i] = 1;
    if (temp[i] < 0) ++mi;
  }
  if (mi > k) {
    puts("-1");
    return 0;
  }
  int rem = k - mi;
  int ed = 0;
  int change = 0;
  while (1) {
    int st = ed + 1;
    if (st > n) break;
    ed = st;
    while (ed + 1 <= n) {
      if (temp[ed + 1] * temp[st] > 0)
        ++ed;
      else
        break;
    }
    if (temp[st] > 0) {
      if (st != 1 && ed != n)
        v.push_back(info(st, ed, 0));
      else
        v.push_back(info(st, ed, 1));
    }
    ++change;
  }
  --change;
  if (temp[1] > 0) {
    if (v.empty())
      exit(3);
    else
      v.erase(v.begin());
  }
  if (!v.empty()) sort(v.begin(), v.end());
  if (temp[1] > 0)
    change += 0;
  else
    change += 1;
  for (int i = 0; i < v.size(); i++) {
    if (rem >= v[i].R - v[i].L + 1) {
      rem -= v[i].R - v[i].L + 1;
      if (v[i].flag == 0)
        change -= 2;
      else
        change -= 1;
    }
  }
  printf("%d\n", change);
}
