#include <bits/stdc++.h>
using namespace std;
const long long inf = 1e9;
const long long mod = 998244353;
long long n, a[100005], dp[2][201][2], pre[201][2];
int main() {
  cin >> n;
  for (long long i = 0; i < n; i++) cin >> a[i];
  for (long long i = 0; i < n; i++) {
    for (long long j = 0; j <= 200; j++) {
      dp[0][j][0] = dp[0][j][1] = 0;
    }
    if (a[i] == -1) {
      for (long long j = 1; j <= 200; j++) {
        dp[0][j][0] = (pre[j - 1][0] + pre[j - 1][1] + (i == 0)) % mod;
        dp[0][j][1] = (pre[200][1] - pre[j - 1][1] + mod) % mod;
        if (i) dp[0][j][1] = (dp[0][j][1] + dp[1][j][0]) % mod;
      }
    } else {
      dp[0][a[i]][0] = (pre[a[i] - 1][0] + pre[a[i] - 1][1] + (i == 0)) % mod;
      dp[0][a[i]][1] = (pre[200][1] - pre[a[i] - 1][1] + mod) % mod;
      if (i) dp[0][a[i]][1] = (dp[0][a[i]][1] + dp[1][a[i]][0]) % mod;
    }
    for (long long j = 1; j <= 200; j++) {
      pre[j][0] = (pre[j - 1][0] + dp[0][j][0]) % mod;
      pre[j][1] = (pre[j - 1][1] + dp[0][j][1]) % mod;
    }
    for (long long j = 0; j <= 200; j++) {
      dp[1][j][0] = dp[0][j][0];
      dp[1][j][1] = dp[0][j][1];
    }
  }
  cout << pre[200][1];
  return 0;
}
