Weird Clock

View as PDF

Submit solution

Points: 12
Time limit: 1.0s
Memory limit: 256M

Problem types

Burak has a very weird clock. It has a regular round shape but contains \(\mathbf{N}\) hands moving in different directions. The length of the clock face circle is \(\mathbf{L}\) units. The k-th hand moves with a speed of \(|\mathbf{V_k}|\) units per second. All hands are of the same length and touch the face circle by their pointers:

  • if \(\mathbf{V_k} > 0\) then the k-th hand moves clockwise;
  • if \(\mathbf{V_k} < 0\) then the k-th hand moves counterclockwise;
  • if \(\mathbf{V_k} = 0\) then the k-th hand does not move.

Alim, a friend of Burak randomly selects initial positions for all the hands and then starts the clock. The positions are selected independently and uniformly at random. What is the probability that during the next \(\mathbf{T}\) seconds at least one of the hands will be in the exact 12 o'clock (pointing above) position?

Input

The first line contains two integers \(\mathbf{L}\) and \(\mathbf{N}\) separated by a single space. Each of the following \(\mathbf{N}\) lines contains integer \(\mathbf{V_k}\). The last line contains integer \(\mathbf{T}\).

Output

Print a single number, the required probability. An output is considered correct if its absolute or relative error does not exceed \(10^{-7}\).

Constraints

  • \(1 <= \mathbf{N} <= 10^5\),
  • \(1 <= \mathbf{L} <= 10^9\),
  • \(|\mathbf{V_k}| <= 10^4\),
  • \(0 <= \mathbf{T} <= 10^5\).

Examples

Input:

5 1
3
1

Output:

0.6

Input:

10 4
1
2
-1
-2
2

Output:

0.7696