#include <bits/stdc++.h>
using namespace std;
int main() {
  int n, k;
  cin >> n >> k;
  vector<int> vec;
  int temp[n];
  int wd = 0;
  int rforn = 0;
  int psn = false;
  int summerday = 0;
  for (int i = 0; i < n; i++) {
    cin >> temp[i];
  }
  int j = 0;
  while (temp[j] >= 0) j++;
  for (int i = j; i < n; i++) {
    if (temp[i] < 0) {
      wd++;
      if (summerday != 0) {
        vec.push_back(summerday);
        summerday = 0;
      }
      if (psn == false) {
        rforn += 2;
        psn = true;
      }
    } else {
      summerday++;
      psn = false;
    }
  }
  if (wd == 0) {
    cout << "0";
    exit(0);
  } else if (wd > k) {
    cout << "-1";
    exit(0);
  }
  k -= wd;
  sort(vec.begin(), vec.end());
  int index = 0;
  int vecelements = vec.size();
  while (k > 0 && index < vecelements) {
    if (vec[index] <= k) {
      rforn -= 2;
      k -= vec[index];
      index++;
    } else {
      break;
    }
  }
  if (summerday == 0 || k >= summerday) {
    rforn--;
  }
  cout << rforn;
  return 0;
}
