#include <bits/stdc++.h>
using namespace std;
int n, a[100002], dp[100002][202][2], sum, ans;
int main() {
  scanf("%d", &n);
  for (int i = 1; i <= n; i++) scanf("%d", a + i);
  if (a[1] == -1)
    for (int i = 1; i <= 200; i++) dp[1][i][1] = 1;
  else
    dp[1][a[1]][1] = 1;
  for (int i = 2; i <= n; i++) {
    if (a[i] != -1) {
      dp[i][a[i]][0] = dp[i - 1][a[i]][1];
      for (int j = 200; j >= a[i]; j--)
        dp[i][a[i]][0] = (dp[i][a[i]][0] + dp[i - 1][j][0]) % 998244353;
      for (int j = 1; j < a[i]; j++)
        dp[i][a[i]][1] =
            ((dp[i][a[i]][1] + dp[i - 1][j][0]) % 998244353 + dp[i - 1][j][1]) %
            998244353;
      continue;
    }
    sum = 0;
    for (int j = 200; j > 0; j--) {
      sum = (sum + dp[i - 1][j][0]) % 998244353;
      dp[i][j][0] = (dp[i - 1][j][1] + sum) % 998244353;
    }
    sum = 0;
    for (int j = 1; j <= 200; j++) {
      dp[i][j][1] = sum;
      sum = ((sum + dp[i - 1][j][0]) % 998244353 + dp[i - 1][j][1]) % 998244353;
    }
  }
  for (int i = 1; i <= 200; i++) ans = (ans + dp[n][i][0]) % 998244353;
  printf("%d", ans);
  return 0;
}
