#include <bits/stdc++.h>
using namespace std;
struct sort_pred {
  bool operator()(const std::pair<int, int> &left,
                  const std::pair<int, int> &right) {
    return left.second < right.second;
  }
};
int main() {
  int n, k;
  scanf("%d %d", &n, &k);
  int t[n], z = 0;
  for (int i = 0; i < n; i++) {
    scanf("%d", &t[i]);
    if (t[i] < 0) z++;
  }
  if (z > k) {
    printf("-1");
    return 0;
  }
  vector<pair<int, int>> pos;
  int sign[n];
  for (int i = 0; i < n; i++) {
    if (t[i] < 0) {
      sign[i] = -1;
    } else {
      if (pos.size() > 0 &&
          pos[pos.size() - 1].first + pos[pos.size() - 1].second == i) {
        pos[pos.size() - 1].second++;
      } else {
        pos.push_back(make_pair(i, 1));
      }
      sign[i] = 1;
    }
  }
  sort(pos.begin(), pos.end(), sort_pred());
  int left = k - z;
  pair<int, int> last = make_pair(-1, -1);
  for (int i = 0; i < pos.size(); i++) {
    if (pos[i].first > 0) {
      if (pos[i].first + pos[i].second >= n) {
        last = pos[i];
        continue;
      }
      if (left - pos[i].second >= 0) {
        for (int j = 0; j < pos[i].second; j++) {
          sign[pos[i].first + j] = -1;
        }
        left -= pos[i].second;
      } else
        break;
    }
  }
  if (last.first != -1 && left - last.second >= 0) {
    for (int j = 0; j < last.second; j++) {
      sign[last.first + j] = -1;
    }
    left -= last.second;
  }
  int res = 0, s = 1;
  for (int i = 0; i < n; i++) {
    if (sign[i] != s) {
      res++;
      s = sign[i];
    }
  }
  printf("%d", res);
}
