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. 
#include<bits/stdc++.h>
#include <ext/pb_ds/assoc_container.hpp> // Common file
#include <ext/pb_ds/tree_policy.hpp> // Including tree_order_statistics_node_update
using namespace __gnu_pbds;
#define int long long
#define pii pair<int,int>
#define ordered_set tree<pii, null_type,less<pii>, rb_tree_tag,tree_order_statistics_node_update>
#define fr first
#define se second
#define mp make_pair
const int mod=998244353;
const int inf=(int)1e15;
     
using namespace std;
     
    //custom hash for unordered map
struct custom_hash {
    static uint64_t splitmix64(uint64_t x) {
        // http://xorshift.di.unimi.it/splitmix64.c
        x += 0x9e3779b97f4a7c15;
        x = (x ^ (x >> 30)) * 0xbf58476d1ce4e5b9;
        x = (x ^ (x >> 27)) * 0x94d049bb133111eb;
        return x ^ (x >> 31);
    }
     
    size_t operator()(uint64_t x) const {
        static const uint64_t FIXED_RANDOM = chrono::steady_clock::now().time_since_epoch().count();
        return splitmix64(x + FIXED_RANDOM);
    }
};

inline int binexp(int a,int b,int m)
{
    int res=1;
    a%=m;
    while(b)
    {
        if(b&1)
    	    res=(res*a)%m;
        a=(a*a)%m;
        b>>=1;
    }
    return res;
}

int inv;

inline int ncr(int n)
{
	int ans = (n * (n - 1) * (n - 2)) % mod;
	ans = (ans * (n - 3)) % mod;
	return (ans * inv) % mod;
}

int arr[100005], suf[100005], dp[100005], sum[100005], pow_[100005];

signed main()
{
    ios::sync_with_stdio(false);
    cin.tie(0);
    cout.tie(0);
    
    #ifndef ONLINE_JUDGE
    freopen("input.txt", "r",stdin);
    freopen("out.txt", "w", stdout);
    #endif
    
    int n;
    cin >> n;
    inv = binexp(24, mod - 2, mod);
    pow_[0] = 1;
    for(int i = 1; i <= n; ++i)
    	pow_[i] = (pow_[i - 1] * 200) % mod;
    for(int i = 1; i <= n; ++i)
    {
    	cin >> arr[i];
    	suf[i] = arr[i] == -1;
    }
    for(int i = n; i >= 1; --i)
    	suf[i] += suf[i + 1];
    int ans = 0;
    for(int i = 1; i <= n; ++i)
    {
    	if(i == 1)
    	{
    		if(arr[i] == -1 && arr[i + 1] != -1)
    		{
    			dp[i] = 200 - arr[i + 1];
    		}
    		else if(arr[i] == -1 && arr[i + 1] == -1)
    		{
    			dp[i] = 100 * (200 -1);
    		}
    		else if(arr[i] != -1 && arr[i + 1] == -1)
    		{
    			dp[i] = arr[i] - 1;
    		}
    		else
    		{
    			dp[i] = arr[i] > arr[i + 1];
    		}
    	}
    	else if(i == n)
    	{
    		if(arr[i] == -1 && arr[i - 1] != -1)
    		{
    			dp[i] = 200 - arr[i - 1];
    		}
    		else if(arr[i] == -1 && arr[i - 1] == -1)
    		{
    			dp[i] = 100 * (200 -1);
    		}
    		else if(arr[i] != -1 && arr[i - 1] == -1)
    		{
    			dp[i] = arr[i] - 1;
    			//cout << "f\n";
    		}
    		else
    		{
    			dp[i] = arr[i] > arr[i - 1];
    		}
    	}
    	else
    	{
    		if(arr[i - 1] == -1 && arr[i] == -1 && arr[i + 1] == -1)
    		{
    			dp[i] = (200 * 201 * 401) / 6;
    		}
    		else if(arr[i - 1] == -1 && arr[i] != -1 && arr[i + 1] == -1)
    		{
    			dp[i] = (arr[i] * (arr[i] + 1) * (2 * arr[i] + 1)) / 6;
    		}
    		else if((arr[i - 1] != -1 && arr[i +1] == -1) || (arr[i - 1] == -1 && arr[i +1] != -1))
    		{
    			int t = max(arr[i - 1], arr[i + 1]);
    			dp[i] = (-ncr(max(arr[i - 1], arr[i + 1])) + ncr(arr[i] == -1 ? 200 : arr[i]) + mod) % mod;
    		}
    		else if(arr[i - 1] != -1 && arr[i] == -1 && arr[i + 1] != -1)
    		{
    			dp[i] = 200 - max(arr[i - 1], arr[i + 1]);
    		}
    		else
    		{
    			dp[i] = arr[i] > arr[i - 1] && arr[i] > arr[i + 1];
    		}
    	}
    	dp[i] %= mod;
    	dp[i] = (dp[i] * pow_[suf[i + 2]]) % mod;
    	dp[i] = (dp[i] * pow_[suf[1] - (i - 1 <= 0 ? suf[1] : suf[i - 1])]) % mod;
    	
    	dp[i] = (dp[i] - (i - 2 < 0 ? 0 : sum[i - 2]) + mod) % mod;
    	sum[i] = (sum[i - 1] + dp[i]) % mod;
    	ans = (ans + dp[i]) % mod;
    	
    }
   // cout << ans << "\n";
    ans = (binexp(200, suf[1], mod) - ans + mod) % mod;
    cout << ans;
    return 0;
}