Ivan unexpectedly saw a present from one of his previous birthdays. It is array of n numbers from 1 to 200. Array is old and some numbers are hard to read. Ivan remembers that for all elements at least one of its neighbours ls not less than it, more formally:

a_{1} ≤ a_{2},

a_{n} ≤ a_{n-1} and

a_{i} ≤ max(a_{i-1},    a_{i+1}) for all i from 2 to n-1.

Ivan does not remember the array and asks to find the number of ways to restore it. Restored elements also should be integers from 1 to 200. Since the number of ways can be big, print it modulo 998244353.

Input

First line of input contains one integer n (2 ≤ n ≤ 10^{5}) — size of the array.

Second line of input contains n integers a_{i} — elements of array. Either a_{i} = -1 or 1 ≤ a_{i} ≤ 200. a_{i} = -1 means that i-th element can't be read.

Output

Print number of ways to restore the array modulo 998244353.

Examples

Input

3
1 -1 2


Output

1


Input

2
-1 -1


Output

200

Note

In the first example, only possible value of a_{2} is 2.

In the second example, a_{1} = a_{2} so there are 200 different values because all restored elements should be integers between 1 and 200. 
/*
Keep solving problems.
*/

import java.util.*;
import java.io.*;

public class CFA {
    BufferedReader br;
    PrintWriter out;
    StringTokenizer st;
    boolean eof;
    private static final long MOD = 998244353L;
    private static final int[] dx = {0, -1, 0, 1};
    private static final int[] dy = {1, 0, -1, 0};
    private static final String yes = "Yes";
    private static final String no = "No";

    int n;
    int[] arr;
    long[][] dp;
    long[][] pref;
    int limit = 205;
    void solve() throws IOException {
        n = nextInt();
        arr = nextIntArr(n);

        dp = new long[2][limit];
        pref = new long[2][limit];
        dp[1][1] = 1;
        for (int i = 0; i < n; i++) {
            for (int j = 0; j < limit; j++) {
                for (int k = 0; k < 2; k++) {
                    if (dp[k][j] == 0) {
                        continue;
                    }

                    if (arr[i] == -1) {
                        if (k == 1) {
                            //[j + 1, 200]
                            pref[0][j + 1] += dp[k][j];
                            pref[0][201] -= dp[k][j];

                            if (pref[0][j + 1] >= MOD) {
                                pref[0][j + 1] -= MOD;
                            }
                            if (pref[0][201] < 0) {
                                pref[0][201] += MOD;
                            }

                            //[1, j]
                            pref[1][1] += dp[k][j];
                            pref[1][j + 1] -= dp[k][j];
                            if (pref[1][1] >= MOD) {
                                pref[1][1] -= MOD;
                            }
                            if (pref[1][j + 1] < 0) {
                                pref[1][j + 1] += MOD;
                            }
                        }
                        else {
                            //[j + 1, 200]
                            pref[0][j + 1] += dp[k][j];
                            pref[0][201] -= dp[k][j];
                            if (pref[0][j + 1] >= MOD) {
                                pref[0][j + 1] -= MOD;
                            }
                            if (pref[0][201] < 0) {
                                pref[0][201] += MOD;
                            }

                            //[j, j]
                            pref[1][j] += dp[k][j];
                            pref[1][j + 1] -= dp[k][j];
                            if (pref[1][j] >= MOD) {
                                pref[1][j] -= MOD;
                            }

                            if (pref[1][j + 1] < 0) {
                                pref[1][j + 1] -= MOD;
                            }
                        }
                    }
                    else {
                        int nj = arr[i];
                        if (k == 1) {
                            if (nj > j) {
                                //[nj, nj]
                                pref[0][nj] += dp[k][j];
                                if (pref[0][nj] >= MOD) {
                                    pref[0][nj] -= MOD;
                                }

                                pref[0][nj + 1] -= dp[k][j];
                                if (pref[0][nj + 1] < 0) {
                                    pref[0][nj + 1] += MOD;
                                }
                            }
                            else {
                                //[nj, nj]
                                pref[1][nj] += dp[k][j];
                                if (pref[1][nj] >= MOD) {
                                    pref[1][nj] -= MOD;
                                }
                                pref[1][nj + 1] -= dp[k][j];
                                if (pref[1][nj + 1] < 0) {
                                    pref[1][nj + 1] += MOD;
                                }
                            }
                        }
                        else {
                            if (nj > j) {
                                //[nj, nj]
                                pref[0][nj] += dp[k][j];
                                pref[0][nj + 1] -= dp[k][j];
                                if (pref[0][nj] >= MOD) {
                                    pref[0][nj] -= MOD;
                                }
                                if (pref[0][nj + 1] < 0) {
                                    pref[0][nj + 1] += MOD;
                                }
                            }
                            else if (nj == j){
                                //[nj, nj]
                                pref[1][nj] += dp[k][j];
                                pref[1][nj + 1] -= dp[k][j];
                                if (pref[1][nj] >= MOD) {
                                    pref[1][nj] -= MOD;
                                }
                                if (pref[1][nj + 1] < 0) {
                                    pref[1][nj + 1] += MOD;
                                }
                            }
                        }
                    }
                }
            }

            calcPref();
        }

        long res = 0;
        for (int j = 0; j < limit; j++) {
            res += dp[1][j];
            if (res >= MOD) {
                res -= MOD;
            }
        }

        outln(res);
    }

    void calcPref() {
        for (int j = 1; j < limit; j++) {
            pref[0][j] += pref[0][j - 1];
            if (pref[0][j] >= MOD) {
                pref[0][j] -= MOD;
            }
            if (pref[0][j] < 0) {
                pref[0][j] += MOD;
            }

            dp[0][j] = pref[0][j];
            pref[1][j] += pref[1][j - 1];
            if (pref[1][j] >= MOD) {
                pref[1][j] -= MOD;
            }
            if (pref[1][j] < 0) {
                pref[1][j] += MOD;
            }

            dp[1][j] = pref[1][j];
        }

        for (int j = 0; j < limit; j++) {
            pref[0][j] = 0;
            pref[1][j] = 0;
        }
    }

//    long add(long a, long b) {
//        long res = a + b;
//        if (res >= MOD) {
//            res -= MOD;
//        }
//        if (res < 0) {
//            res += MOD;
//        }
//        return res;
//    }

    void shuffle(int[] a) {
        int n = a.length;
        for(int i = 0; i < n; i++) {
            int r = i + (int) (Math.random() * (n - i));
            int tmp = a[i];
            a[i] = a[r];
            a[r] = tmp;
        }
    }
    long gcd(long a, long b) {
        while(a != 0 && b != 0) {
            long c = b;
            b = a % b;
            a = c;
        }
        return a + b;
    }
    private void outln(Object o) {
        out.println(o);
    }
    private void out(Object o) {
        out.print(o);
    }
    private void formatPrint(double val) {
        outln(String.format("%.9f%n", val));
    }
    public CFA() throws IOException {
        br = new BufferedReader(new InputStreamReader(System.in));
        out = new PrintWriter(System.out);
        solve();
        out.close();
    }
    public static void main(String[] args) throws IOException {
        new CFA();
    }

    public long[] nextLongArr(int n) throws IOException{
        long[] res = new long[n];
        for(int i = 0; i < n; i++)
            res[i] = nextLong();
        return res;
    }
    public int[] nextIntArr(int n) throws IOException {
        int[] res = new int[n];
        for(int i = 0; i < n; i++)
            res[i] = nextInt();
        return res;
    }
    public String nextToken() {
        while (st == null || !st.hasMoreTokens()) {
            try {
                st = new StringTokenizer(br.readLine());
            } catch (Exception e) {
                eof = true;
                return null;
            }
        }
        return st.nextToken();
    }
    public String nextString() {
        try {
            return br.readLine();
        } catch (IOException e) {
            eof = true;
            return null;
        }
    }
    public int nextInt() throws IOException {
        return Integer.parseInt(nextToken());
    }
    public long nextLong() throws IOException {
        return Long.parseLong(nextToken());
    }
    public double nextDouble() throws IOException {
        return Double.parseDouble(nextToken());
    }
}