#include <bits/stdc++.h>
using namespace std;
int main() {
  long long int n, k, arr[200001], neg = 0, flag = 0, seg[200001], count1 = 0;
  cin >> n >> k;
  for (int i = 0; i < n; i++) {
    cin >> arr[i];
    if (arr[i] < 0) neg++;
  }
  int ans = 0, prev = -1, tire = 1;
  for (int i = 0; i < n; i++) {
    if (k == 0 and neg > 0) {
      flag = 1;
      break;
    }
    if (prev == -1) {
      if (arr[i] < 0) {
        prev = i;
        ans++;
        k--;
        neg--;
      }
    } else {
      if (arr[i] < 0) {
        seg[count1++] = i - prev - 1;
        prev = i;
        ans += 2;
        k--;
        neg--;
      }
    }
  }
  if (flag) {
    cout << -1 << "\n";
    return 0;
  }
  if (prev != -1) ans++;
  sort(seg, seg + count1);
  for (int i = 0; i < count1; i++) {
    if (seg[i] <= k) {
      ans -= 2;
      k -= seg[i];
    } else
      break;
  }
  if (k >= n - prev - 1 and prev != -1) {
    ans--;
    k = 0;
  }
  cout << ans << "\n";
}
