#include <bits/stdc++.h>
using namespace std;
int tem[200010] = {0};
int win[200010] = {0};
int itv[200010] = {0};
int tail = 0;
int n, k, ans = 0;
int main() {
  cin >> n >> k;
  int used = 0;
  win[0] = 0;
  for (int i = 1; i <= n; i++) {
    cin >> tem[i];
    if (tem[i] < 0) {
      win[i] = 1;
      used++;
    }
    if (win[i] != win[i - 1]) ans++;
  }
  int left = k - used;
  if (left < 0)
    cout << -1;
  else {
    bool flag = 0;
    int len = 0;
    for (int i = 1; i <= n; i++) {
      if (flag) {
        if (win[i]) {
          if (len) itv[len]++;
          len = 0;
        } else {
          len++;
          if (i == n) tail = len;
        }
      } else if (win[i]) {
        flag = 1;
        len = 0;
      }
    }
    for (int i = 1; left >= i && i <= n; i++) {
      while (itv[i] && left >= i) {
        itv[i]--;
        ans -= 2;
        left -= i;
      }
    }
    if (tail && left >= tail) {
      left -= tail;
      ans--;
    }
    cout << ans;
  }
  return 0;
}
