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. 
import java.math.BigInteger;
import java.text.DecimalFormat;
import java.util.*;
import java.io.*;



public class Main {
    private static int mod = 998244353;
    private static int add (int a,int b) {
        a += b;
        if (a >= mod) a -= mod;
        if (a < 0) return a += mod;
        return a;
    }
    private static int mul (int a,int b){
        long ab = a*(long)b;
        ab %= mod;
        return (int)ab;
    }
    public static void main(String[] args) throws Exception {
        IO io ;
        try {
            io = new IO("in.in", null);
        } catch (IOException e) {
            io = new IO(null, null);
        }
        int n = io.getNextInt();
        int [] A = new int[n];
        for (int i = 0;i < n;i++)
            A[i] = io.getNextInt();
        int [] [] [] dp = new int[2][2][201];
        int [] [] pref = new int[2][201];
        for (int i = 1;i <= 200;i++) {
            dp[0][1][i] = 1;
            pref[1][i] = i;
        }
        for (int i = n-1;i >= 0;i--) {
            for (int c = 0;c < 2;c++)
                for (int prv = 0;prv <= 200;prv++) {
                    int val = 0;
                    if (A[i] == -1) {
                        if (c == 0) {
                            val = add(pref[0][200],-pref[0][prv]);
                            if (prv != 0)
                                val = add(dp[0][1][prv],val);
                        }
                        else {
                            int tmp = add(pref[1][prv],-pref[1][0]);
                            val = tmp;
                            tmp = add(pref[0][200],-pref[0][prv]);
                            val = add(val,tmp);
                        }
                    }
                    else {
                        int x = A[i];
                        if (c == 0) {
                            if (x < prv) val = 0;
                            else if (x == prv) {
                                val = dp[0][1][x];
                            }
                            else {
                                val = dp[0][0][x];
                            }
                        }
                        else {
                            if (x <= prv)
                                val = dp[0][1][x];
                            else
                                val = dp[0][0][x];
                        }
                    }
                    dp[1][c][prv] = val;
                }
            for (int c = 0;c < 2;c++) {
                int s = 0;
                for (int prv = 0; prv <= 200; prv++) {
                    dp[0][c][prv] = dp[1][c][prv];
                    pref[c][prv] = s = add(s,dp[1][c][prv]);
                }
//                System.err.println(Arrays.toString(dp[0][c]));
            }
//            System.err.println();
        }
        io.println(dp[0][0][0]);
        io.close();
    }
    private static final int onebillion7 = 1000000007;
}


class IO{
    private BufferedReader br;
    private StringTokenizer st;
    private PrintWriter writer;
    private String inputFile,outputFile;

    public boolean hasMore() throws IOException{
        if(st != null && st.hasMoreTokens()) return true;
        if(br != null && br.ready()) return true;
        return false;
    }

    public String getNext() throws FileNotFoundException, IOException{
        while(st == null || !st.hasMoreTokens()) st = new StringTokenizer(br.readLine());
        return st.nextToken();
    }

    public String getNextLine() throws FileNotFoundException, IOException{
        return br.readLine().trim();
    }

    public int getNextInt() throws FileNotFoundException, IOException{
        return Integer.parseInt(getNext());
    }
    public long getNextLong() throws FileNotFoundException, IOException{
        return Long.parseLong(getNext());
    }

    public void print(double x,int num_digits) throws  IOException{
        writer.printf("%." + num_digits + "f" ,x);
    }
    public void println(double x,int num_digits) throws  IOException{
        writer.printf("%." + num_digits + "f\n" ,x);
    }
    public void print(Object o) throws  IOException{
        writer.print(o.toString());
    }

    public void println(Object o) throws  IOException{
        writer.println(o.toString());
    }
    public IO(String x,String y) throws FileNotFoundException, IOException{
        inputFile = x;
        outputFile = y;
        if(x != null) br = new BufferedReader(new FileReader(inputFile));
        else br = new BufferedReader(new InputStreamReader(System.in));
        if(y != null) writer = new PrintWriter(new BufferedWriter(new FileWriter(outputFile)));
        else writer = new PrintWriter(new OutputStreamWriter(System.out));
    }

    protected void close() throws IOException{
        br.close();
        writer.close();
    }
    public void outputArr(Object [] A) throws IOException{
        int L = A.length;
        for (int i = 0;i < L;i++) {
            if(i > 0) writer.print(" ");
            writer.print(A[i]);
        }
        writer.print("\n");
    }
}