#include <bits/stdc++.h>
using namespace std;
int t[2 * 111111];
class Solution {
 public:
  void solve(std::istream& in, std::ostream& out) {
    int n, k;
    in >> n >> k;
    ;
    int answer = 0;
    int sum = 0;
    t[0] = 1;
    vector<int> intervals;
    for (int i = 1; i < n + 1; i++) {
      in >> t[i];
      if (t[i] < 0)
        t[i] = -1;
      else
        t[i] = 1;
      if (t[i] < 0) sum++;
      if (t[i] != t[i - 1]) answer++;
    }
    int last = -1;
    for (int i = 1; i < n + 1; i++) {
      if (t[i] == -1) {
        last = i;
        break;
      }
    }
    if (last == -1) {
      out << 0;
      return;
    }
    for (int i = last + 1; i < n + 1; i++) {
      if (t[i - 1] != -1 && t[i] == -1) {
        intervals.push_back(i - last - 1);
      }
      if (t[i] == -1) last = i;
    }
    if (sum > k) {
      out << -1;
      return;
    }
    int foo = k - sum;
    sort((intervals).begin(), (intervals).end());
    for (auto x : intervals) {
      if (x <= foo) {
        foo -= x;
        answer -= 2;
      }
    }
    if (n - last <= foo && last != n) answer--;
    out << answer;
  }
};
void solve(std::istream& in, std::ostream& out) {
  out << std::setprecision(15);
  int T = 1;
  if (0) in >> T;
  Solution solution;
  if (true)
    while (T--) solution.solve(in, out);
}
int main() {
  ios_base::sync_with_stdio(0);
  cin.tie(0);
  istream& in = cin;
  ostream& out = cout;
  solve(in, out);
  return 0;
}
