#include <bits/stdc++.h>
using namespace std;
vector<int> vec, wec;
int n, m, arr[2 * 100005], cnt = 0;
int main() {
  ios_base::sync_with_stdio(0);
  cin.tie(0);
  cin >> n >> m, arr[0] = 1;
  for (int i = 1; i <= n; ++i) {
    cin >> arr[i], arr[i] >= 0 ? arr[i] = 1 : arr[i] = -1;
    if (arr[i] != arr[i - 1]) ++cnt;
    if (arr[i] < 0) --m, vec.push_back(i);
  }
  for (int i = 1; i < (int)vec.size(); ++i) {
    if (vec[i] - vec[i - 1] - 1 && vec[i] != n)
      wec.push_back(vec[i] - vec[i - 1] - 1);
  }
  sort(wec.begin(), wec.end());
  for (int i = 0; i < (int)wec.size(); ++i) {
    if (wec[i] <= m)
      m -= wec[i], cnt -= 2;
    else
      break;
  }
  if ((int)vec.size()) {
    if (arr[n] == 1 && n - vec[(int)vec.size() - 1] <= m) --cnt;
  }
  if (m >= 0)
    cout << cnt << "\n";
  else
    cout << -1 << "\n";
  cin.clear();
  cin.ignore();
  cin.get();
  return 0;
}
