#include <bits/stdc++.h>
using namespace std;
int main() {
  int n, k;
  cin >> n >> k;
  int temp[n + 1];
  int neg = 0;
  for (int i = 1; i <= n; i++) {
    cin >> temp[i];
    if (temp[i] < 0) {
      neg++;
    }
  }
  if (neg == 0) {
    cout << 0;
  } else {
    if (k < neg) {
      cout << -1;
    } else {
      int counter = 1;
      k -= neg;
      vector<int> vec;
      int start, last, prev;
      for (int i = 1; i <= n; i++) {
        if (temp[i] < 0) {
          start = i;
          break;
        }
      }
      for (int i = n; i >= 1; i--) {
        if (temp[i] < 0) {
          last = i;
          break;
        }
      }
      prev = start;
      start++;
      while (start <= last) {
        if (temp[start] < 0) {
          if (start != prev + 1) {
            vec.push_back(start - prev - 1);
          }
          prev = start;
        }
        start++;
      }
      sort(vec.begin(), vec.end());
      int sz = 0;
      for (auto diff : vec) {
        if (diff <= k) {
          k -= diff;
          sz++;
        } else {
          break;
        }
      }
      counter += 2 * (vec.size() - sz);
      if (last != n) {
        int diff = n - last;
        if (diff > k) {
          counter++;
        }
      }
      cout << counter;
    }
  }
}
