#include <bits/stdc++.h>
using namespace std;
int main() {
  ios_base::sync_with_stdio(false);
  cin.tie(NULL);
  int t;
  t = 1;
  while (t--) {
    long long n, k;
    cin >> n >> k;
    long long i;
    vector<int> v(0);
    long long temp = 0;
    long long swi = 0;
    for (i = 0; i < n; i++) {
      long long a;
      cin >> a;
      if ((a < 0) && (swi == 1)) {
        v.push_back(temp);
        temp = 0;
      } else if (a < 0) {
        swi = 1;
        temp = 0;
      } else {
        temp++;
      }
    }
    n = v.size();
    if (n + 1 > k && swi == 1) {
      cout << -1 << endl;
      continue;
    }
    if (swi == 0) {
      cout << 0 << endl;
      continue;
    }
    int m = k - n - 1;
    int count = 0;
    sort(v.begin(), v.end());
    for (i = 0; i < n; i++) {
      if (v[i] > m) {
        break;
      } else {
        m -= v[i];
        count++;
      }
    }
    n -= count;
    long long ans = 2 * n + 1;
    if (temp > m) {
      ans++;
    }
    cout << ans << endl;
  }
  return 0;
}
