#include <bits/stdc++.h>
using namespace std;
const int INF = 0x3f3f3f3f;
const double PI = acos(-1.0);
const int N = 1e5 + 5, mod = 998244353;
int n, a[N];
int dp[N][2][211], pref[2][211], suf[2][211];
int main(void) {
  scanf("%d", &n);
  for (int i = 0; i < n; i++) scanf("%d", a + i);
  for (int j = 1; j <= 200; j++) {
    dp[n][1][j] = 1;
    dp[n][0][j] = 0;
  }
  pref[0][0] = pref[1][0] = 0;
  for (int j = 1; j <= 200; j++) {
    pref[0][j] = pref[0][j - 1] + dp[n][0][j];
    if (pref[0][j] >= mod) pref[0][j] -= mod;
    pref[1][j] = pref[1][j - 1] + dp[n][1][j];
    if (pref[1][j] >= mod) pref[1][j] -= mod;
  }
  suf[0][201] = suf[1][201] = 0;
  for (int j = 200; j >= 0; j--) {
    suf[0][j] = suf[0][j + 1] + dp[n][0][j];
    if (suf[0][j] >= mod) suf[0][j] -= mod;
    suf[1][j] = suf[1][j + 1] + dp[n][1][j];
    if (suf[1][j] >= mod) suf[1][j] -= mod;
  }
  for (int i = n - 1; i >= 0; i--) {
    if (a[i] != -1) {
      for (int j = 1; j <= 200; j++) {
        if (a[i] < j) {
          dp[i][0][j] = 0;
          dp[i][1][j] = dp[i + 1][1][a[i]];
        } else if (a[i] == j) {
          dp[i][0][j] = dp[i + 1][1][a[i]];
          dp[i][1][j] = dp[i + 1][1][a[i]];
        } else {
          dp[i][0][j] = dp[i + 1][0][a[i]];
          dp[i][1][j] = dp[i + 1][0][a[i]];
        }
      }
    } else {
      for (int j = 1; j <= 200; j++) {
        dp[i][0][j] = dp[i + 1][1][j] + suf[0][j + 1];
        if (dp[i][0][j] >= mod) dp[i][0][j] -= mod;
      }
      for (int j = 1; j <= 200; j++) {
        dp[i][1][j] = pref[1][j] + suf[0][j + 1];
        if (dp[i][1][j] >= mod) dp[i][1][j] -= mod;
      }
    }
    pref[0][0] = pref[1][0] = 0;
    for (int j = 1; j <= 200; j++) {
      pref[0][j] = pref[0][j - 1] + dp[i][0][j];
      if (pref[0][j] >= mod) pref[0][j] -= mod;
      pref[1][j] = pref[1][j - 1] + dp[i][1][j];
      if (pref[1][j] >= mod) pref[1][j] -= mod;
    }
    suf[0][201] = suf[1][201] = 0;
    for (int j = 200; j >= 0; j--) {
      suf[0][j] = suf[0][j + 1] + dp[i][0][j];
      if (suf[0][j] >= mod) suf[0][j] -= mod;
      suf[1][j] = suf[1][j + 1] + dp[i][1][j];
      if (suf[1][j] >= mod) suf[1][j] -= mod;
    }
  }
  printf("%d\n", dp[0][1][1]);
  return 0;
}
