func_code_string: #include <bits/stdc++.h>   using namespace std;   long long a[200010];   int main() {     int n;     while (~scanf( %lld , &n)) {       long long ans = 0;       for (int i = 0; i < n; ++i) scanf( %lld , &a[i]);       for (int i = 0; i < n;) {         ans++;         long long j = i;         while (j < n && a[j] == -1) j++;         if (j == n) break;         long long k = j + 1;         while (k < n && a[k] == -1) k++;         if (k == n) break;         long long d = k - j;         if ((a[k] - a[j]) % d) {           i = k;           continue;         }         long long s = (a[k] - a[j]) / d;         if (s > 0 && a[j] - s * (j - i) <= 0) {           i = k;           continue;         }         long long r = k + 1;         while (r < n) {           long long e = a[k] + s * (r - k);           if (a[r] != -1 && a[r] != e) break;           if (e <= 0) break;           r++;         }         i = r;       }       printf( %lld n , ans);     }     return 0;   }   