#include <bits/stdc++.h>
using namespace std;
const long long md = 1e9 + 7;
long long a[1000005], n;
vector<int> v;
int main() {
  ios_base::sync_with_stdio(0);
  cin.tie(0);
  cout.tie(0);
  long long q, m, k, h, ans = 0, sum = 0, x = 0, y, p;
  cin >> n >> k;
  for (int i = 0; i < n; ++i) {
    cin >> a[i];
    if (a[i] < 0)
      a[i] = 1;
    else
      a[i] = 0;
    if (a[i]) ++sum;
  }
  if (sum > k) return cout << -1, 0;
  long long buf = k - sum;
  int cur = 0, cur2 = 0;
  for (; a[cur] == 0 && cur < n; ++cur)
    ;
  if (cur == n) return cout << 0, 0;
  for (cur2 = n - 1; cur2 >= 0 && a[cur2] == 0; --cur2)
    ;
  cur2++;
  if (cur2 < n) ++ans;
  p = n - cur2;
  for (int i = cur; i < cur2; ++i) {
    ++ans;
    int j = i;
    for (; j < cur2 && a[j] == a[i]; ++j)
      ;
    if (i && a[i] == 0) v.push_back(j - i);
    i = j - 1;
  }
  sort(v.begin(), v.end());
  sum = 0;
  for (auto i : v) {
    if (sum + i > buf)
      break;
    else {
      sum += i;
      ans -= 2;
    }
  }
  if (p + sum <= buf && a[n - 1] == 0) ans--;
  cout << ans;
}
