#include <bits/stdc++.h>
using namespace std;
long long dp[3][300][3];
int ara[300000];
long long cal(long long v) {
  if (v < 998244353) return (v + 998244353) % 998244353;
  return v;
}
int main() {
  int i, j, k, l, m, n;
  scanf("%d", &n);
  for (int i = 1; i <= n; i++) {
    scanf("%d", &ara[i]);
  }
  int ps = 1;
  for (int i = 1; i <= 200; i++) {
    dp[ps][i][1] = dp[ps][i - 1][1] + 1;
  }
  for (int i = n; i >= 1; i--) {
    ps ^= 1;
    int st = 1;
    if (i == 1) st = 0;
    for (int j = 1; j <= 200; j++) {
      dp[ps][j][0] = dp[ps][j][1] = 0;
    }
    for (int j = st; j <= 200; j++) {
      for (int k = 0; k <= 1; k++) {
        if (i == 1 && k == 1) continue;
        long long ret = 0;
        if (k == 1) {
          if (ara[i] == -1) {
            ret += cal(dp[ps ^ 1][j][1]);
            ret += cal(dp[ps ^ 1][200][0] - dp[ps ^ 1][j][0]);
          } else {
            ret += cal(dp[ps ^ 1][ara[i]][ara[i] <= j] -
                       dp[ps ^ 1][ara[i] - 1][ara[i] <= j]);
          }
          dp[ps][j][k] += ret % 998244353;
          continue;
        }
        if (ara[i] == -1) {
          if (j)
            ret += cal(dp[ps ^ 1][j][1] - dp[ps ^ 1][j - 1][1]) +
                   cal(dp[ps ^ 1][200][0] - dp[ps ^ 1][j][0]);
          else
            ret += cal(dp[ps ^ 1][200][0] - dp[ps ^ 1][j][0]);
          dp[ps][j][k] += ret % 998244353;
          continue;
        }
        if (ara[i] < j) continue;
        ret += cal(dp[ps ^ 1][ara[i]][ara[i] == j] -
                   dp[ps ^ 1][ara[i] - 1][ara[i] == j]);
        dp[ps][j][k] = ret % 998244353;
      }
      if (i == 1 && j == 0) break;
    }
    for (int j = 1; j <= 200; j++) {
      dp[ps][j][0] += dp[ps][j - 1][0];
      dp[ps][j][0] % 998244353;
      dp[ps][j][1] += dp[ps][j - 1][1];
      dp[ps][j][1] % 998244353;
    }
  }
  printf("%lld\n", dp[ps][0][0]);
}
