#include <bits/stdc++.h>
using namespace std;
int main() {
  int n, k, i;
  scanf("%d %d", &n, &k);
  int a[n + 1], v[n + 1];
  for (i = 0; i < n; i++) {
    scanf("%d", &a[i]);
    v[i] = 0;
  }
  i = 0;
  while (a[i] >= 0 && i < n) i++;
  if (i == n) {
    printf("0\n");
    return 0;
  }
  int count = 0;
  for (i; i < n; i++) {
    if (a[i] < 0) {
      v[i] = count;
      count = 0;
      k--;
    } else
      count++;
  }
  if (k < 0) {
    printf("-1\n");
    return 0;
  }
  int f = count;
  sort(v, v + n);
  i = 0;
  while (v[i] == 0 && i < n) i++;
  int req = 2 * (n - i + 1);
  while (k > 0 && i < n) {
    if (k >= v[i]) {
      k = k - v[i];
      req = req - 2;
      i++;
    } else
      break;
  }
  if (k >= f) {
    req--;
    k = k - f;
  }
  printf("%d\n", req);
  return 0;
}
