#include <bits/stdc++.h>
using namespace std;
int datas[200005];
long long tmp[200005];
int beg, cnt;
long long n, k;
int cmp(long long a, long long b) { return a > b; }
int main() {
  cin >> n >> k;
  long long cnts = 0;
  for (int i = 0; i < n; i++) {
    cin >> datas[i];
  }
  datas[n] = -1;
  for (int i = 0; i < n; i++) {
    if (datas[i] >= 0) {
      cnts++;
    } else {
      break;
    }
  }
  if (cnts == n) {
    cout << 0 << "\n";
    return 0;
  }
  for (int i = cnts; i < n; i++) {
    if (datas[i] < 0) {
      if (cnt) {
        tmp[beg] = cnt;
        beg++;
        cnt = 0;
      }
    } else {
      cnt++;
    }
  }
  sort(tmp, tmp + beg, cmp);
  long long ans = 9999999999;
  long long tmans;
  if (cnt) {
    tmans = 0;
    long long tmps = n - cnts;
    tmans++;
    tmps -= cnt;
    for (int i = 0; i <= beg; i++) {
      if (tmps <= k) {
        ans = min(ans, tmans);
        break;
      }
      tmans += 2;
      tmps -= tmp[i];
    }
    tmps = n - cnts;
    tmans = 0;
    for (int i = 0; i <= beg; i++) {
      if (tmps <= k) {
        ans = min(ans, tmans);
        break;
      }
      tmans += 2;
      tmps -= tmp[i];
    }
  } else {
    long long tmps = n - cnts;
    tmans = 0;
    for (int i = 0; i <= beg; i++) {
      if (tmps <= k) {
        ans = min(ans, tmans);
        break;
      }
      tmans += 2;
      tmps -= tmp[i];
    }
  }
  if (ans == 9999999999LL) {
    cout << "-1\n";
  } else {
    cout << ans + 1 << "\n";
  }
}
