#include <bits/stdc++.h>
using namespace std;
vector<pair<int, int> > v;
int t[200005];
int main() {
  std::ios::sync_with_stdio(false);
  int n, k, i, c = 0, val, val1, ans = 0, ans1, c1 = -1;
  cin >> n >> k;
  for (i = 0; i < n; i++) {
    cin >> t[i];
    if (t[i] < 0) c++;
  }
  if (c > k) {
    cout << -1 << endl;
    return 0;
  }
  if (c == 0)
    cout << 0 << endl;
  else {
    val1 = k - c;
    for (i = 0; i < n; i++) {
      if (t[i] < 0) {
        val = i;
        break;
      }
    }
    c = 0;
    for (i = val; i < n; i++) {
      if (t[i] < 0) {
        if (c != 0) v.push_back(make_pair(c, i));
        c = 0;
      } else
        c++;
    }
    ans = 1;
    if (c != 0) {
      v.push_back(make_pair(c, i));
      c1 = c;
      ans += 2 * v.size() - 1;
    } else {
      ans += 2 * v.size();
    }
    ans1 = ans;
    sort(v.begin(), v.end());
    val = 0;
    for (i = 0; i < v.size(); i++) {
      val += v[i].first;
      if (val > val1)
        break;
      else {
        if (v[i].second != n)
          ans -= 2;
        else
          ans -= 1;
      }
    }
    val = 0;
    for (i = 0; i < v.size(); i++) {
      if (v[i].second != n) {
        val += v[i].first;
        if (val > val1)
          break;
        else {
          ans1 -= 2;
        }
      }
    }
    if (val + c1 <= val1 && c1 != -1) {
      ans1 -= 1;
    }
    cout << min(ans, ans1) << endl;
  }
}
