#include <bits/stdc++.h>
using namespace std;
const int maxn = 200010;
int a[maxn], n, ans;
int main() {
  while (~scanf("%d", &n)) {
    for (int i = 1; i <= n; i++) scanf("%d", &a[i]);
    ans = 0;
    bool fir = false, sec = false;
    int arb = -1;
    int d, pre = -1;
    for (int i = 1; i <= n; i++) {
      if (a[i] > 0) {
        if (!fir)
          fir = true;
        else if (!sec) {
          if ((a[i] - a[pre]) % (i - pre)) {
            arb = -1;
            ans++;
          } else {
            d = (a[i] - a[pre]) / (i - pre);
            if (arb == -1 || a[i] - 1LL * (i - arb) * d > 0)
              sec = true;
            else {
              ans++;
              arb = -1;
            }
          }
        } else {
          if (a[i] - a[pre] != 1LL * (i - pre) * d) {
            ans++;
            sec = false;
            arb = -1;
          }
        }
        pre = i;
      } else {
        if (sec && a[pre] + 1LL * (i - pre) * d <= 0) {
          fir = false;
          sec = false;
          ans++;
          arb = i;
        } else if (arb == -1)
          arb = i;
      }
    }
    printf("%d\n", ++ans);
  }
  return 0;
}
