#include <bits/stdc++.h>
using namespace std;
int dX[] = {-1, 0, 1, 0, -1, 1, 1, -1};
int dY[] = {0, 1, 0, -1, 1, 1, -1, -1};
bool cmp(pair<int, int> lft, pair<int, int> ryt) {
  if (lft.second != ryt.second)
    return lft.second > ryt.second;
  else
    return lft.first < ryt.first;
}
int main() {
  ios_base::sync_with_stdio(0);
  int n, k, tmp;
  vector<pair<int, int> > data;
  int ans = 0;
  int minRequired = 0;
  deque<int> Q;
  cin >> n >> k;
  for (int i = 0; i < n; ++i) {
    cin >> tmp;
    if (tmp < 0) {
      minRequired++;
      Q.push_back(0);
    } else {
      Q.push_back(1);
    }
  }
  if (minRequired > k) {
    cout << "-1" << endl;
    return 0;
  }
  int cnt = 0;
  while (!Q.empty() && Q.front() == 1) {
    cnt++;
    Q.pop_front();
  }
  if (Q.size() > 0) ans++;
  cnt = 0;
  while (!Q.empty() && Q.back() == 1) {
    cnt++;
    Q.pop_back();
  }
  if (cnt > 0) data.push_back(make_pair(cnt, 1));
  while (!Q.empty()) {
    while (!Q.empty() && Q.front() == 0) {
      Q.pop_front();
    }
    int numOfOnes = 0;
    while (!Q.empty() && Q.front() == 1) {
      numOfOnes++;
      Q.pop_front();
    }
    if (numOfOnes > 0) data.push_back(make_pair(numOfOnes, 2));
  }
  sort(data.begin(), data.end(), cmp);
  int remaining = k - minRequired;
  for (int i = 0; i < data.size(); ++i) {
    if (remaining >= data[i].first) {
      remaining -= data[i].first;
    } else {
      ans += data[i].second;
    }
  }
  cout << ans << endl;
  return 0;
}
