#include <bits/stdc++.h>
using namespace std;
const long long maxn = 2 * 1e5 + 10;
int length[maxn];
int num[maxn];
struct node {
  int x, y;
} pos[maxn];
int main() {
  int n, k;
  cin >> n >> k;
  int len1 = 0;
  int len2 = 0;
  int cnt = 0;
  memset(num, 0, sizeof(num));
  memset(length, 0, sizeof(length));
  for (int i = 1; i <= n; i++) {
    cin >> num[i];
    if (num[i] < 0) cnt++;
  }
  int ans = 0;
  for (int i = 2; i <= n; i++) {
    if ((num[i] >= 0 && num[i - 1] < 0) || (num[i] < 0 && num[i - 1] >= 0))
      ans++;
  }
  if (num[1] < 0) ans++;
  if (cnt > k)
    cout << -1 << endl;
  else if (cnt == 0)
    cout << 0 << endl;
  else if (cnt == k)
    cout << ans << endl;
  else {
    for (int i = 1; i <= n; i++) {
      if (num[i] < 0) {
        int j = i;
        while (num[j] < 0 && j <= n) j++;
        pos[len1].x = i;
        pos[len1].y = j - 1;
        if (len1) length[len2++] = pos[len1].x - pos[len1 - 1].y - 1;
        i = j - 1;
        len1++;
      }
    }
    sort(length, length + len2);
    k -= cnt;
    for (int i = 0; i < len2; i++) {
      if (length[i] <= k) {
        k -= length[i];
        ans -= 2;
      } else
        break;
    }
    if (num[n] >= 0) {
      length[len2] = n - pos[len1 - 1].y;
      if (length[len2] <= k) ans--;
    }
    cout << ans << endl;
  }
}
