You are given an integer array A of length N, consisting of 0's and 1's. Let a be initially the array A. You are going to perform the following operation N−1 times.
There are 2N−1×(N−1)! ways to perform the operations. Count the number of ways that result in a single value of 1, modulo 998244353.
The first line contains an integer N (1≤N≤106).
The second line contains integers A_1,A_2,…,A_N (0≤A_i≤1).
Print the answer.