#include <bits/stdc++.h>
using namespace std;
const long long INF = 1e18;
const int maxn = 2e5 + 10;
const long long MOD = 1000000007;
const double EPS = 1e-10;
const double Pi = acos(-1.0);
int t[maxn];
vector<int> G;
int main() {
  int n, k;
  cin >> n >> k;
  G.clear();
  int cnt = 0, pre = -1, Max = 0;
  for (int i = 1; i <= n; i++) {
    cin >> t[i];
    if (t[i] < 0) {
      cnt++;
      Max = i;
      if (pre == -1)
        pre = i;
      else
        G.push_back(i - pre - 1), pre = i;
    }
  }
  if (cnt == 0) {
    cout << 0 << endl;
    return 0;
  }
  if (cnt > k) {
    cout << -1 << endl;
    return 0;
  }
  k -= cnt;
  sort(G.begin(), G.end());
  int ans = 2 * cnt;
  for (int i = 0; i < G.size(); i++)
    if (k >= G[i]) {
      k -= G[i];
      ans -= 2;
    }
  if (k >= n - Max) ans--;
  cout << ans << endl;
  return 0;
}
