#include <bits/stdc++.h>
using namespace std;
int main() {
  int n, k;
  cin >> n >> k;
  int day = 1;
  bool cold = false;
  int cold_cost = 1;
  int warm_duration = 0;
  priority_queue<int, vector<int>, std::greater<int>> warm_durations;
  for (; !cold && day <= n; ++day) {
    int temp;
    cin >> temp;
    cold = temp < 0;
  }
  if (!cold) {
    cout << 0;
    return 0;
  }
  for (; day <= n; ++day) {
    int temp;
    cin >> temp;
    bool cold_today = temp < 0;
    if (cold_today) {
      ++cold_cost;
      if (!cold) {
        warm_durations.push(warm_duration);
        warm_duration = 0;
        cold = true;
      }
    } else {
      cold = false;
      ++warm_duration;
    }
  }
  if (cold_cost > k) {
    cout << -1;
    return 0;
  }
  while (!warm_durations.empty()) {
    if (cold_cost + warm_durations.top() > k) {
      break;
    }
    cold_cost += warm_durations.top();
    warm_durations.pop();
  }
  cout << warm_durations.size() * 2 + 1 +
              (cold || warm_duration + cold_cost <= k ? 0 : 1);
}
