#include <bits/stdc++.h>
using namespace std;
inline void read(int &x) {
  register int c = getchar();
  x = 0;
  int neg = 0;
  for (; ((c < 48 || c > 57) && c != '-'); c = getchar())
    ;
  if (c == '-') {
    neg = 1;
    c = getchar();
  }
  for (; c > 47 && c < 58; c = getchar()) {
    x = (x << 1) + (x << 3) + c - 48;
  }
  if (neg) x = -x;
}
inline void writeln(int x) {
  char buffor[21];
  register int i = 0;
  int neg = 0;
  if (x < 0) {
    neg = 1;
    x = -x;
  }
  do {
    buffor[i++] = (x % 10) + '0';
    x /= 10;
  } while (x);
  i--;
  if (neg) putchar('-');
  while (i >= 0) putchar(buffor[i--]);
  putchar('\n');
}
const int N = (int)2e5 + 10;
int n, k, t[N];
vector<pair<int, int> > nega;
int d[N];
void input() {
  cin >> n >> k;
  for (int i = 1; i <= n; i++) cin >> t[i];
  for (int i = 1; i <= n; i++)
    if (t[i] < 0) k--;
}
void solve() {
  if (k < 0) {
    cout << -1;
    return;
  }
  t[0] = 0;
  for (int i = 1; i <= n; i++)
    if (t[i] < 0 and t[i - 1] >= 0) {
      int j = i;
      while (j <= n and t[j] < 0) j++;
      nega.push_back(pair<int, int>(i, j - 1));
    }
  if (nega.size() == 0) {
    cout << 0;
    return;
  }
  for (int i = 0; i <= (int)nega.size() - 2; i++)
    d[i] = nega[i + 1].first - nega[i].second - 1;
  int cnt = nega.size() - 1;
  sort(d + 0, d + 0 + cnt);
  int res = 0;
  for (int i = 0; i <= cnt - 1; i++) {
    if (k - d[i] < 0) {
      res = 2 * (cnt - i + 1);
      break;
    } else
      k -= d[i];
  }
  if (res == 0) res = 2;
  if (t[n] < 0)
    cout << res - 1;
  else {
    if (k - (n - nega[nega.size() - 1].second) < 0)
      cout << res;
    else
      cout << res - 1;
  }
}
int main() {
  ios_base::sync_with_stdio(false);
  cin.tie(NULL);
  input();
  solve();
  return 0;
}
