#include <bits/stdc++.h>
using namespace std;
int col[200010], hot[200010], sumc, prevs, j, t, flag, iterh = -1, iterc = -1;
int main() {
  int n, k;
  cin >> n >> k;
  for (j = 0; j < n; j++) {
    cin >> t;
    if (t < 0) {
      iterc++;
      col[iterc]++;
      sumc++;
      prevs = 1;
      break;
    }
  }
  for (int i = j + 1; i < n; i++) {
    cin >> t;
    int s = (t >= 0) ? 0 : 1;
    if (s != prevs) {
      if (!s)
        iterh++;
      else
        iterc++;
    }
    if (!s) {
      hot[iterh]++;
      if (i + 1 == n) flag = 1;
    } else {
      col[iterc]++;
      sumc++;
    }
    prevs = s;
  }
  if (sumc > k) {
    cout << "-1" << endl;
    return 0;
  }
  if (iterc == -1) {
    cout << "0" << endl;
    return 0;
  }
  if (iterh == -1) {
    cout << "1" << endl;
    return 0;
  }
  int rem = k - sumc;
  sort(hot, hot + iterh + 1 - flag);
  for (int i = 0; i <= iterh - flag; i++) {
    if (hot[i] <= rem) {
      rem -= hot[i];
      iterc--;
    }
  }
  int ans = (iterc + 1) * 2;
  if (flag && hot[iterh] <= rem) {
    ans--;
  } else if (!flag) {
    ans--;
  }
  cout << ans << endl;
  return 0;
}
