You are an enthusiastic worker. You want to know how many days you can work during the next specified number of days.
Saturdays and Sundays are non-working days. In addition, a number of national holidays and some company-specific days are non-working days. You cannot work on non-working days. Such non-working days may overlap: The founding anniversary of the company may coincide with a national holiday. Even when such non-working days coincide, there is no system to grant additional non-working days.
Today is Monday. Your task is to count the number of days you can work within a specified period starting from today.
The input consists of at most $$$100$$$ test cases. Each test case is given in the following format.
| $$$n$$$ $$$m$$$ |
| $$$a_1$$$ $$$\cdots$$$ $$$a_n$$$ |
The first line contains the number of additional non-working days $$$n,$$$ and the number of days of the specified period $$$m$$$ ($$$1 \le n \le 300$$$, $$$1 \le m \le 10^{18}$$$). The second line contains $$$n$$$ integers, $$$a_1, \ldots, a_n$$$ ($$$1 \le a_i \le 10^{18}$$$). With today being the first day, the $$$a_i$$$-th day for $$$i=1,\ldots,n$$$ is a non-working day. The list $$$a_1, \ldots, a_n$$$ may contain duplicates.
The end of the input is indicated by a line consisting of two zeros.
For each test case, output in a line the number of days you can work during $$$m$$$ days starting from today.
4 81 2 3 42 1015 33 146 7 135 10000000000000000008 15 1 8 9999999999999999942 31 40 0
2 7 10 714285714285714282 2
| Название |
|---|


