#include <bits/stdc++.h>
#pragma GCC optimize("Ofast")
using namespace std;
const int N = 1e5 + 7;
const int mod = 998244353;
int dp[2][N][222];
int qry(int c, int lv, int i, int j) {
  if (i > j) return 0;
  return (dp[c][lv][j] + mod - dp[c][lv][i - 1]) % mod;
}
int main() {
  int n;
  scanf("%d", &n);
  vector<int> a(n + 1);
  for (int i = 1; i <= n; ++i) scanf("%d", &a[i]);
  if (a[1] == -1)
    for (int i = 1; i <= 200; ++i) dp[0][1][i] = dp[0][1][i - 1] + 1;
  else {
    dp[0][1][a[1]] = 1;
    for (int i = 1; i <= 200; ++i) dp[0][1][i] += dp[0][1][i - 1];
  }
  for (int i = 2; i <= n; ++i) {
    if (~a[i]) {
      dp[1][i][a[i]] =
          (qry(1, i - 1, a[i], 200) + qry(0, i - 1, a[i], a[i])) % mod;
      dp[0][i][a[i]] =
          (qry(1, i - 1, 1, a[i] - 1) + qry(0, i - 1, 1, a[i] - 1)) % mod;
    } else {
      for (int k = 1; k <= 200; ++k)
        dp[1][i][k] = (qry(1, i - 1, k, 200) + qry(0, i - 1, k, k)) % mod;
      for (int k = 1; k <= 200; ++k)
        dp[0][i][k] = (qry(1, i - 1, 1, k - 1) + qry(0, i - 1, 1, k - 1)) % mod;
    }
    for (int c = 0; c < 2; ++c)
      for (int k = 1; k <= 200; ++k)
        dp[c][i][k] = (dp[c][i][k - 1] + dp[c][i][k]) % mod;
  }
  cout << dp[1][n][200] << endl;
  return 0;
}
