#include <bits/stdc++.h>
const int inf = 1 << 30;
const long long INF = 1ll << 61;
using namespace std;
int nnum[200000 + 55];
int n;
void init() {}
bool input() {
  while (cin >> n) {
    for (int i = 0; i < n; i++) cin >> nnum[i];
    return false;
  }
  return true;
}
void cal() {
  long long ans = 0;
  long long last = -1;
  long long now = -1;
  long long cnt = 0;
  long long tmp = 0;
  long long d;
  for (int i = 0; i < n; i++) {
    if (nnum[i] < 0) {
      if (last == -1)
        cnt++;
      else if (now == -1)
        continue;
      else if (tmp + d > 0)
        tmp += d;
      else {
        last = -1;
        now = -1;
        cnt = 1;
        ans++;
      }
    } else {
      if (last == -1)
        last = i;
      else if (now == -1) {
        if ((nnum[i] - nnum[last]) % (i - last) != 0) {
          last = i;
          ans++;
          cnt = 0;
          continue;
        }
        d = (nnum[i] - nnum[last]) / (i - last);
        if (nnum[last] <= cnt * d) {
          ans++;
          last = i;
          cnt = 0;
        } else {
          now = i;
          tmp = nnum[i];
        }
      } else {
        if (tmp + d == nnum[i])
          tmp = nnum[i];
        else {
          last = i;
          cnt = 0;
          now = -1;
          ans++;
        }
      }
    }
  }
  ans++;
  cout << ans << endl;
}
void output() {}
int main() {
  while (true) {
    init();
    if (input()) return 0;
    cal();
    output();
  }
  return 0;
}
