Question
Mystic Index Quest

In a bustling village, a clever young scholar named Mira was captivated by the secrets of numbers. One day, while examining a collection of N enchanted gems, she decided to define a special index known as a “Mystic Index.” For Mira, a mystic index is a position in the arrangement of gems where the number of gems divisible by a mystical number K to the left of that index is less than or equal to the number of gems divisible by K to the right. Intrigued by this idea, Mira embarked on a journey to uncover how many mystic indexes were hidden among her enchanted gems. Can you assist Mira in discovering the total number of mystic indexes within her collection?

Input
The first line of the input contains two integers N and K.
The second line of the input contains N space seperated integers.

Constraints
1 ≤ N ≤ 105
1 ≤ K ≤ 100
1 ≤ Ai ≤ 105
Output
Print the number of mystic indexes in the given array.
Example
Sample Input
7 4
3 4 3 4 5 4 5
Sample Output
4
Explanation
Indexes 1, 2, 3 and 4 are mystic indexes.

Online