#include <bits/stdc++.h>
using namespace std;
const int Maxn = 1e5;
const int Maxval = 200;
const long long Mod = 998244353;
int N, A[Maxn + 5];
long long f[2][Maxval + 5][3];
int main() {
  scanf("%d", &N);
  for (int i = 1; i <= N; i++) scanf("%d", &A[i]);
  int now = 0;
  for (int j = 1; j <= Maxval; j++)
    if (A[1] == -1 || A[1] == j) f[now][j][0] = 1;
  for (int i = 2; i <= N; i++) {
    for (int j = 1; j <= Maxval; j++) {
      if (A[i] == -1 || A[i] == j)
        f[now ^ 1][j][1] = (f[now][j][0] + f[now][j][1] + f[now][j][2]) % Mod;
      else
        f[now ^ 1][j][1] = 0;
    }
    long long sum = 0;
    for (int j = 1; j <= Maxval; j++) {
      if (A[i] == -1 || A[i] == j)
        f[now ^ 1][j][0] = sum;
      else
        f[now ^ 1][j][0] = 0;
      sum = (sum + ((f[now][j][0] + f[now][j][1]) % Mod + f[now][j][2]) % Mod) %
            Mod;
    }
    sum = 0;
    for (int j = Maxval; j >= 1; j--) {
      if (A[i] == -1 || A[i] == j)
        f[now ^ 1][j][2] = sum;
      else
        f[now ^ 1][j][2] = 0;
      sum = ((sum + f[now][j][1]) % Mod + f[now][j][2]) % Mod;
    }
    now ^= 1;
  }
  int ans = 0;
  for (int i = 1; i <= Maxval; i++)
    ans = (ans + f[now][i][1] + f[now][i][2]) % Mod;
  printf("%d\n", ans);
  return 0;
}
