#include <bits/stdc++.h>
using namespace std;
const long long int md = 998244353;
int main() {
  ios::sync_with_stdio(false);
  cin.tie(NULL);
  int n;
  cin >> n;
  vector<int> v(n);
  for (int i = (0); i < (int)(n); ++i) cin >> v[i];
  vector<vector<long long int>> need(2, vector<long long int>(201, 0));
  vector<vector<long long int>> ok(2, vector<long long int>(201, 0));
  if (v[0] == -1) {
    for (int a = (1); a < (int)(201); ++a) need[1][a] = 1;
  } else {
    need[1][v[0]] = 1;
  }
  for (int i = (1); i < (int)(n); ++i) {
    int old = (i & 1), nw = old ^ 1;
    long long int sm = 0;
    for (int a = (1); a < (int)(201); ++a) {
      need[nw][a] = sm;
      sm = (sm + ok[old][a] + need[old][a]) % md;
    }
    sm = 0;
    for (int a = 200; a >= 1; --a) {
      sm = (sm + ok[old][a]) % md;
      ok[nw][a] = (sm + need[old][a]) % md;
    }
    if (v[i] != -1) {
      for (int a = (1); a < (int)(201); ++a)
        if (a != v[i]) ok[nw][a] = need[nw][a] = 0;
    }
  }
  long long int sm = 0;
  for (int a = (1); a < (int)(201); ++a) sm = (sm + ok[n & 1][a]) % md;
  cout << sm << endl;
  return 0;
}
