#include <bits/stdc++.h>
using namespace std;
int f[2][205][2];
inline void update(int &x, long long y) { x = (x + y) % 998244353; }
int num[100005];
int main() {
  int n;
  scanf("%d", &n);
  for (int i = 1; i <= n; i++) scanf("%d", &num[i]);
  int cur = 0;
  if (num[1] == -1) {
    for (int j = 1; j <= 200; j++) f[cur][j][1] = 1;
  } else
    f[cur][num[1]][1] = 1;
  for (int i = 2; i <= n; i++) {
    cur ^= 1;
    memset(f[cur], 0, sizeof(f[cur]));
    int s = 0;
    for (int j = 1; j <= 200; j++) {
      if (num[i] == -1 || num[i] == j) {
        update(f[cur][j][1], s);
        update(f[cur][j][0], f[cur ^ 1][j][0] + f[cur ^ 1][j][1]);
      }
      update(s, f[cur ^ 1][j][0] + f[cur ^ 1][j][1]);
    }
    s = 0;
    for (int j = 200; j >= 0; j--) {
      if (num[i] == -1 || num[i] == j) update(f[cur][j][0], s);
      update(s, f[cur ^ 1][j][0]);
    }
  }
  int ans = 0;
  for (int i = 1; i <= 200; i++) update(ans, f[cur][i][0]);
  printf("%d\n", ans);
  return 0;
}
