Beautiful results table
Oleh is a renowned enthusiast of programming contests. He is familiar with every participant from all contests over the past decade and can recount how many problems a team with any participant has solved in any given contest. Additionally, Oleh has a passion for number theory.
In a programming contest's scoreboard, teams are ranked in descending order based on the number of problems they have solved. Oleh describes a scoreboard as beautiful if, for every team, the number of problems they have solved is either zero or a divisor of the total number of problems in the contest. When a team submits a problem, the count of problems they have solved increases by one. No team can submit more than one problem at a time, and no two teams can submit a problem simultaneously.
Upon examining a beautiful scoreboard, Oleh became curious: how many additional problems can teams collectively submit while ensuring that the scoreboard remains beautiful after each submission? Your task is to determine this number.
Input
The first line of the input contains two integers: n and m - representing the number of teams and the number of problems in the contest, respectively (1 ≤ n ≤ 100, 1 ≤ m ≤ 10^9). The second line contains n integers, sorted in non-decreasing order, indicating the number of problems each team has solved. It is guaranteed that all non-zero numbers are divisors of the number m.
Output
Output a single number: the maximum number of problems that teams can collectively submit while ensuring that the scoreboard remains beautiful after each submission.