#include <bits/stdc++.h>
using namespace std;
int a[200010];
vector<int> vec;
vector<int> vec1;
int main() {
  int n, k;
  cin >> n >> k;
  int s = 0;
  int cnt = 0;
  int cnt1 = 0;
  bool fl = 0;
  int ans = 0;
  a[0] = 1;
  for (int i = 1; i <= n; ++i) {
    cin >> a[i];
  }
  for (int i = 1; i <= n; ++i) {
    if (a[i] >= 0) {
      a[i] = 1;
      ++cnt;
      if (cnt1 > 0) {
        vec1.push_back(cnt1);
        cnt1 = 0;
      }
    } else {
      a[i] = -1;
      ++cnt1;
      ++s;
      if (cnt > 0) {
        if (fl) {
          vec.push_back(cnt);
        }
        cnt = 0;
      }
      fl = 1;
    }
    if (a[i] != a[i - 1]) {
      ++ans;
    }
  }
  if (s > k) {
    cout << -1;
    return 0;
  }
  if (cnt > 0) {
    vec.push_back(cnt);
  }
  sort(vec.begin(), vec.end());
  if (ans == 0) {
    cout << 0;
    return 0;
  }
  int i;
  for (i = 0; i < vec.size(); ++i) {
    if (k - s - vec[i] >= 0) {
      ans -= 2;
      s += vec[i];
    } else {
      break;
    }
  }
  cnt = 0;
  for (int j = n; j >= 1; --j) {
    if (a[j] == 1) {
      ++cnt;
    } else {
      break;
    }
  }
  if (i == vec.size() && cnt > 0) {
    ++ans;
    cout << ans;
    return 0;
  }
  if (i == vec.size() || cnt >= vec[i] || cnt == 0) {
    cout << ans;
    return 0;
  }
  if (k - (s - cnt + vec[i]) >= 0) {
    cout << ans;
    return 0;
  }
  ++ans;
  cout << ans;
  return 0;
}
