#include <bits/stdc++.h>
using namespace std;
int main() {
  int n, k, cd = 0, index = 0, changes = 0;
  cin >> n >> k;
  int v[n];
  std::vector<int> ve;
  for (int i = 0; i < n; ++i) {
    cin >> v[i];
    if (v[i] < 0) k--;
  }
  if (k < 0)
    cout << -1 << endl;
  else {
    for (int i = 0; i < n; ++i) {
      if (v[i] < 0)
        break;
      else {
        cd++;
        index++;
      }
    }
    index++;
    ve.push_back(cd);
    if (cd != n) changes += 2;
    cd = 0;
    bool kd = false;
    for (int i = index; i < n; ++i) {
      if (v[i] < 0 && cd > 0) {
        kd = true;
        changes += 2;
        ve.push_back(cd);
        cd = 0;
      } else {
        if (v[i] >= 0) cd++;
      }
    }
    ve.push_back(cd);
    if ((cd == 0 && kd == true) || (cd == 0 && kd == false) && changes > 0)
      changes--;
    int a, b;
    a = ve[0];
    b = ve[ve.size() - 1];
    ve[0] = 9999;
    ve[ve.size() - 1] = 9999;
    sort(ve.begin(), ve.end());
    for (int i = 0; i < ve.size() - 2; ++i) {
      if (ve[i] <= k) {
        k -= ve[i];
        changes -= 2;
      } else
        break;
    }
    int Min = min(a, b);
    int Max = max(a, b);
    if (b <= k && b > 0) {
      k -= b;
      changes--;
    }
    cout << changes << endl;
  }
  return 0;
}
