#include <bits/stdc++.h>
using namespace std;
const long long LINF = 334ll << 53;
const int INF = 15 << 26;
const long long MOD = 1E9 + 7;
int main() {
  cin.tie(0);
  ios::sync_with_stdio(false);
  int days, k, cnt = 0, s = 0, ans = 0;
  cin >> days >> k;
  vector<int> t(days), nn;
  for (int(i) = 0; (i) < (days); ++(i)) {
    cin >> t[i];
    if (t[i] < 0) {
      if (cnt > 0 and s != 0) nn.push_back(s);
      cnt++;
      s = 0;
      if (i == 0 or t[i - 1] >= 0) ++ans;
    } else {
      ++s;
      if (i != 0 and t[i - 1] < 0) ++ans;
    }
  }
  if (cnt > k) {
    cout << -1 << endl;
    return 0;
  }
  if (cnt == 0) {
    cout << 0 << endl;
    return 0;
  }
  sort((nn).begin(), (nn).end());
  int res = k - cnt;
  for (int(i) = 0; (i) < (nn.size()); ++(i)) {
    if (res - nn[i] >= 0) {
      res -= nn[i];
      ans -= 2;
    }
  }
  if (s != 0 and res >= s) ans -= 1;
  cout << ans << endl;
  return 0;
}
