#include <bits/stdc++.h>
using namespace std;
inline void boost() {
  ios_base::sync_with_stdio(0);
  cin.tie(0), cout.tie(0);
}
const int MXN = 2e5 + 5;
int n, k, ans = 1, cold, last = MXN, t[MXN];
multiset<int> d;
bool isP(int x) { return (x < 0 ? 0 : 1); }
int main() {
  cin >> n >> k;
  for (int i = 1; i <= n; i++) {
    cin >> t[i];
    if (!isP(t[i])) last = min(last, i), cold++;
  }
  if (cold > k) {
    cout << -1;
    return 0;
  }
  if (cold == 0) {
    cout << 0;
    return 0;
  }
  int l = 0;
  for (int i = last; i <= n; i++) {
    if (!isP(t[i]) && isP(t[i - 1]) && l) {
      d.insert(l);
      l = 0;
    }
    if (isP(t[i]) != isP(t[i - 1]) && i > last) ans++;
    if (isP(t[i])) l++;
  }
  for (auto x : d) {
    if (x > k - cold) break;
    cold += x;
    ans -= 2;
  }
  if (isP(t[n])) {
    l = 0;
    for (int i = n; i >= 1 && isP(t[i]); i--) l++;
    if (cold + l <= k) ans--;
  }
  cout << ans;
  return 0;
}
