#include <bits/stdc++.h>
using namespace std;
int n;
const int mxn = (1e5) + 5;
int a[mxn];
int mod = 998244353;
int dp[205][2];
int prf_sm[205][2];
void sum() {
  for (int i = 1; i <= 200; ++i) {
    prf_sm[i][0] = (prf_sm[i - 1][0] + dp[i][0]) % mod;
    prf_sm[i][1] = (prf_sm[i - 1][1] + dp[i][1]) % mod;
  }
}
int get(int l, int r, int b) {
  if (r < l) return 0;
  return (prf_sm[r][b] - prf_sm[l - 1][b] + mod) % mod;
}
void calc(int x) {
  dp[x][0] = (dp[x][0] + get(1, x - 1, 0)) % mod;
  dp[x][0] = (dp[x][0] + get(1, x - 1, 1)) % mod;
  dp[x][1] = (dp[x][1] + get(x, x, 0)) % mod;
  dp[x][1] = (dp[x][1] + get(x, x, 1)) % mod;
  dp[x][1] = (dp[x][1] + get(x + 1, 200, 1)) % mod;
}
int main() {
  scanf("%d", &n);
  for (int i = 1; i <= n; ++i) scanf("%d", &a[i]);
  if (a[1] != -1)
    dp[a[1]][0] = 1;
  else
    for (int i = 1; i <= 200; ++i) dp[i][0] = 1;
  sum();
  for (int i = 2; i <= n; ++i) {
    memset(dp, 0, sizeof dp);
    if (a[i] != -1)
      calc(a[i]);
    else
      for (int i = 1; i <= 200; ++i) calc(i);
    sum();
  }
  printf("%d\n", get(1, 200, 1));
  return 0;
}
