#include <bits/stdc++.h>
using namespace std;
int n, k, a[200010], sz;
struct X {
  int L, R, len;
} s[200010];
vector<int> v;
int f[200010];
bool cmp(X a, X b) { return a.len < b.len; }
int main() {
  scanf("%d%d", &n, &k);
  for (int i = 1; i <= n; i++) scanf("%d", &a[i]);
  int sum = 0;
  for (int i = 1; i <= n; i++)
    if (a[i] < 0) f[i] = 1, sum++;
  if (sum > k)
    printf("-1\n");
  else {
    if (sum == 0)
      printf("0\n");
    else {
      for (int i = 1; i <= n; i++)
        if (a[i] < 0) v.push_back(i);
      for (int i = 0; i < v.size() - 1; i++)
        s[sz].L = v[i], s[sz].R = v[i + 1], s[sz].len = s[sz].R - s[sz].L - 1,
        sz++;
      sort(s, s + sz, cmp);
      sum = k - sum;
      for (int i = 0; i < sz; i++) {
        if (sum >= s[i].len) {
          for (int j = s[i].L; j <= s[i].R; j++) f[j] = 1;
          sum = sum - s[i].len;
        }
      }
      if (sum >= n + 1 - v[v.size() - 1] - 1) {
        for (int i = v[v.size() - 1]; i <= n; i++) f[i] = 1;
      }
      int ans = 0;
      int f1 = 1, f2 = n;
      for (int i = 1; i <= n; i++) {
        if (f[i] == 0)
          continue;
        else {
          f1 = i;
          break;
        }
      }
      for (int i = n; i >= 1; i--) {
        if (f[i] == 0)
          continue;
        else {
          f2 = i;
          break;
        }
      }
      ans = ans + 1;
      if (f2 != n) ans = ans + 1;
      for (int i = f1 + 1; i <= f2; i++) {
        if (f[i] != f[i - 1]) ans++;
      }
      printf("%d\n", ans);
    }
  }
  return 0;
}
