#include <bits/stdc++.h>
using namespace std;
int n;
const int maxn = 1e5 + 10;
int A[maxn];
int dp[maxn][210][2] = {0};
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) {
      int cur = 0;
      for (int j = 1; j <= 200; j++) {
        dp[i][j][1] = cur;
        cur =
            (cur + (dp[i - 1][j][1] + dp[i - 1][j][0]) % 998244353) % 998244353;
      }
      cur = 0;
      for (int j = 200; j >= 1; --j) {
        cur = (cur + dp[i - 1][j][0]) % 998244353;
        dp[i][j][0] = (dp[i - 1][j][1] + cur) % 998244353;
      }
    } else {
      for (int j = 1; j < A[i]; j++) {
        dp[i][A[i]][1] =
            (dp[i][A[i]][1] + (dp[i - 1][j][1] + dp[i - 1][j][0]) % 998244353) %
            998244353;
      }
      for (int j = 200; j >= A[i]; --j) {
        dp[i][A[i]][0] = (dp[i][A[i]][0] + dp[i - 1][j][0]) % 998244353;
      }
      dp[i][A[i]][0] = (dp[i][A[i]][0] + dp[i - 1][A[i]][1]) % 998244353;
    }
  }
  int ans = 0;
  if (A[n] == -1) {
    for (int i = 1; i <= 200; i++) {
      ans = (ans + dp[n][i][0]) % 998244353;
    }
  } else {
    ans = dp[n][A[n]][0];
  }
  printf("%d\n", ans);
  return 0;
}
