You are given an array of integers. Each integer is a single digit number in the range . You are also given a number . Now, you need to count how many subsequences of the array exist such that they form a digit valid number.
A subsequence of size is called a valid number if there are no leading zeros in the number formed.
Notes:
Input Fomat
The first line contains an integer as input denoting the size of the array.
Next line contains space separated integers that denote elements of the array.
Next line contains an integer .
Output Format
In the output, you need to print the count of valid digit numbers modulo .
Constraints
In the given sample following are the possible subsequences that form a valid digit number.