H. Don't Exceed
time limit per test
4 seconds
memory limit per test
256 megabytes
input
standard input
output
standard output

You generate real numbers s 1, s 2, ..., s n as follows:

• s 0 = 0;
• s i = s i - 1 + t i, where t i is a real number chosen independently uniformly at random between 0 and 1, inclusive.

You are given real numbers x 1, x 2, ..., x n. You are interested in the probability that s i ≤ x i is true for all i simultaneously.

It can be shown that this can be represented as , where P and Q are coprime integers, and . Print the value of P·Q  - 1 modulo 998244353.

Input

The first line contains integer n (1 ≤ n ≤ 30).

The next n lines contain real numbers x 1, x 2, ..., x n, given with at most six digits after the decimal point (0 < x i ≤ n).

Output

Print a single integer, the answer to the problem.

Examples
Input
41.0023.0000004.0
Output
1
Input
10.50216
Output
342677322
Input
20.51.0
Output
623902721
Input
60.771.2345672.11.8902.99993.77
Output
859831967
Note

In the first example, the sought probability is 1 since the sum of i real numbers which don't exceed 1 doesn't exceed i.

In the second example, the probability is x 1 itself.

In the third example, the sought probability is 3 / 8.