#include <bits/stdc++.h>
using namespace std;
long long a[200005];
int main() {
  int i, t = 1, s = 0, n;
  scanf("%d", &n);
  for (i = 1; i <= n; i++) scanf("%lld", &a[i]);
  while (t <= n) {
    s++;
    int p1 = t, p2;
    while (a[p1] == -1) p1++;
    p2 = p1 + 1;
    while (a[p2] == -1) p2++;
    if (p2 > n) break;
    long long gc = (a[p2] - a[p1]) / (p2 - p1);
    if ((a[p2] - a[p1]) % (p2 - p1) || (p1 - t) * gc >= a[p1]) {
      t = p2;
      continue;
    } else {
      t = p2 + 1;
      while (a[p2] + gc * (t - p2) > 0 &&
             (a[t] - a[p2] == gc * (t - p2) || a[t] == -1))
        t++;
    }
  }
  printf("%d", s);
  return 0;
}
