#include <bits/stdc++.h>
using namespace std;
int N, K;
int A[200005], P[200005];
vector<pair<int, int>> v;
int main() {
  scanf("%d %d", &N, &K);
  int negCnt = 0;
  for (int i = 1; i <= N; i++) {
    scanf("%d", &A[i]);
    if (A[i] < 0) {
      negCnt++;
    }
  }
  if (negCnt > K) {
    printf("%d\n", -1);
    return 0;
  }
  int i = 1;
  while (i <= N) {
    int len = -1;
    for (int j = i; j <= N; j++) {
      if (A[i] >= 0 && A[j] < 0 || A[i] < 0 && A[j] >= 0) {
        len = j - i;
        if (A[i] >= 0) {
          v.push_back(make_pair(1, len));
        } else {
          v.push_back(make_pair(-1, len));
        }
        i = j;
        break;
      }
    }
    if (len == -1) {
      len = N - i + 1;
      if (A[i] >= 0) {
        v.push_back(make_pair(1, len));
      } else {
        v.push_back(make_pair(-1, len));
      }
      break;
    }
  }
  vector<int> len;
  for (int i = 1; i < v.size(); i++) {
    if (v[i].first == 1 && i + 1 != v.size()) {
      len.push_back(v[i].second);
    }
  }
  for (int i = 0; i < v.size(); i++) {
    if (v[i].first == -1) {
      K -= v[i].second;
    }
  }
  sort(len.begin(), len.end());
  int res = 0, res1 = 1 << 30, res2 = 1 << 30;
  if (v[0].first == 1) {
    res = (int)v.size() - 1;
  } else {
    res = (int)v.size();
  }
  if (res == 0) {
    printf("%d\n", 0);
    return 0;
  }
  if (v.back().first == 1 && K >= v.back().second) {
    res1 = res;
    int tempK = K;
    tempK -= v.back().second;
    res1--;
    for (int l : len) {
      if (tempK < l) break;
      tempK -= l;
      res1 -= 2;
    }
  }
  res2 = res;
  int tempK = K;
  for (int l : len) {
    if (tempK < l) break;
    tempK -= l;
    res2 -= 2;
  }
  printf("%d\n", min(res1, res2));
  return 0;
}
