#include <bits/stdc++.h>
using namespace std;
int main() {
  unsigned int n, k;
  cin >> n >> k;
  int t[n];
  unsigned int i, j;
  unsigned int count = 0;
  unsigned int summer = 0;
  unsigned int winter = 0;
  vector<int> d;
  for (i = 0; i < n; i++) {
    cin >> t[i];
    if (t[i] >= 0) {
      summer += 1;
    } else {
      winter += 1;
      d.push_back(i);
    }
  }
  if (summer == n) {
    cout << 0 << endl;
  } else if (k < winter) {
    cout << -1 << endl;
  } else if (k >= n) {
    if (summer == n) {
      cout << 0 << endl;
    } else {
      cout << 1 << endl;
    }
  } else {
    vector<int> differences;
    int residual = k - winter;
    for (i = 0; i < d.size() - 1; i++) {
      if ((d[i + 1] - d[i] - 1) > 0) {
        differences.push_back(d[i + 1] - d[i] - 1);
      }
    }
    if (differences.size() > 0) {
      sort(differences.begin(), differences.end());
    }
    i = 0;
    while (i < differences.size() && (residual - differences[i]) >= 0) {
      residual = residual - differences[i];
      i += 1;
    }
    j = i;
    for (i = 0; i < n - 1; i++) {
      if (t[i] >= 0 && t[i + 1] < 0) {
        count += 1;
      } else if (t[i] < 0 && t[i + 1] >= 0) {
        count += 1;
      }
    }
    if (t[0] < 0) {
      int m = n - 1 - d[d.size() - 1];
      if (t[n - 1] >= 0 && residual >= m) {
        cout << count - 2 * j << endl;
      } else {
        cout << count - 2 * j + 1 << endl;
      }
    } else {
      int m = n - 1 - d[d.size() - 1];
      if (t[n - 1] >= 0 && residual >= m) {
        cout << count - 2 * j - 1 << endl;
      } else {
        cout << count - 2 * j << endl;
      }
    }
  }
}
