#include <bits/stdc++.h>
using namespace std;
const long long int mod = 1e9 + 7;
long long int gcd(long long int a, long long int b) {
  if (b < a) {
    int temp = a;
    a = b;
    b = temp;
  }
  if (a == 0) {
    return b;
  }
  return gcd(b % a, a);
}
long long int lcm(long long int a, long long int b) {
  return (a * b / gcd(a, b));
}
vector<long long int> getprimes() {
  vector<long long int> pl(101, 1);
  for (int i = 2; i <= 100; i++) {
    if (pl[i] == 1) {
      for (int j = 2 * i; j <= 100; j += i) {
        pl[j] = 0;
      }
    }
  }
  return pl;
}
long long int primefactorise(int n) {
  if (n == 1) {
    return 1;
  }
  long long int ans = n;
  while (n % 2 == 0) {
    n = n / 2;
    if (n != 1) {
      ans += n;
    }
  }
  for (int i = 3; i <= sqrt(n); i = i + 2) {
    while (n % i == 0) {
      n = n / i;
      if (n != 1) {
        ans += n;
      }
    }
  }
  ans += 1;
  return ans;
}
long long int power(long long int a, long long int b) {
  long long int ans = 1;
  while (b > 0) {
    if (b % 2 == 1) {
      ans *= a;
      ans = ans % mod;
    }
    b /= 2;
    a *= a;
    a = a % mod;
  }
  return ans % mod;
}
vector<long long int> getbinary(long long int first) {
  vector<long long int> bin(8, 0);
  long long int iter = 0;
  while (first > 0) {
    if (first % 2 == 0) {
      bin[iter] = 0;
    } else {
      bin[iter] = 1;
    }
    first /= 2;
    iter++;
  }
  return bin;
}
long long int dist(pair<long long int, long long int> a,
                   pair<long long int, long long int> b) {
  return (b.first - a.first) * (b.first - a.first) +
         (b.second - a.second) * (b.second - a.second);
}
bool comparator(const pair<long long int, long long int> &a,
                const pair<long long int, long long int> &b) {
  if (a.first == b.first) {
    return a.second < b.second;
  }
  return a.first > b.first;
}
int main() {
  ios_base::sync_with_stdio(false);
  cin.tie(NULL);
  cout.precision(20);
  long long int n, k;
  cin >> n >> k;
  long long int temp;
  vector<pair<long long int, long long int> > negdist;
  long long int curr = 0;
  long long int ans = 0;
  long long int prev = -1;
  for (int i = 0; i < n; i++) {
    cin >> temp;
    if (temp >= 0 && curr == 1) {
      ans++;
      curr = 0;
    } else if (temp < 0 && curr == 0) {
      k--;
      ans++;
      curr = 1;
      if (prev != -1) {
        negdist.push_back(make_pair(2, i - prev - 1));
      }
      prev = i;
    } else if (temp < 0 && curr == 1) {
      k--;
      negdist.push_back(make_pair(2, i - prev - 1));
      prev = i;
    }
  }
  if (prev != -1) {
    negdist.push_back(make_pair(1, n - prev - 1));
  }
  if (k < 0) {
    cout << -1 << endl;
    return 0;
  }
  sort(negdist.begin(), negdist.end(), comparator);
  for (int i = 0; i < negdist.size(); i++) {
    if (negdist[i].second <= k && negdist[i].second != 0) {
      ans -= negdist[i].first;
      k -= negdist[i].second;
    }
  }
  cout << ans << endl;
}
