#include <bits/stdc++.h>
using namespace std;
long long n, lis[100500], dp[2][222][3], cul[2][222][3];
int main() {
  ios::sync_with_stdio(0);
  cin >> n;
  for (long long i = (0); i <= ((long long)(n)-1); i++) cin >> lis[i];
  for (long long i = (1); i <= (200); i++) {
    if (lis[0] == -1 || lis[0] == i) dp[0][i][2] = 1;
    cul[0][i][2] = dp[0][i][2] + cul[0][i - 1][2];
  }
  for (long long i = (1); i <= (n - 1); i++)
    for (long long j = (1); j <= (200); j++) {
      if (lis[i] == -1 || lis[i] == j) {
        if (j < 200)
          dp[i % 2][j][0] =
              (cul[(i + 1) % 2][200][1] - cul[(i + 1) % 2][j][1]) % 998244353 +
              (cul[(i + 1) % 2][200][0] - cul[(i + 1) % 2][j][0]) % 998244353;
        dp[i % 2][j][1] =
            (dp[(i + 1) % 2][j][0] + dp[(i + 1) % 2][j][1]) % 998244353 +
            dp[(i + 1) % 2][j][2];
        dp[i % 2][j][2] =
            (cul[(i + 1) % 2][j - 1][0] + cul[(i + 1) % 2][j - 1][1]) %
                998244353 +
            cul[(i + 1) % 2][j - 1][2];
        for (long long k = (0); k <= ((long long)(3) - 1); k++)
          dp[i % 2][j][k] %= 998244353;
      } else
        for (long long k = (0); k <= ((long long)(3) - 1); k++)
          dp[i % 2][j][k] = 0;
      for (long long k = (0); k <= ((long long)(3) - 1); k++)
        cul[i % 2][j][k] = (cul[i % 2][j - 1][k] + dp[i % 2][j][k]) % 998244353;
    }
  cout << (998244353 +
           (cul[(n + 1) % 2][200][1] + cul[(n + 1) % 2][200][0]) % 998244353) %
              998244353;
}
