Let be a non-empty sequence of integers and be a positive integer. The functions and are defined as follows.
For example,
.
.
.
Observe that is always a sequence with exactly one element.
You are given a sequence of integers . An index is hot if and only if there exists a sequence satisfying the following conditions:
and is an integer between and , inclusive;
for all ;
The only element in is a multiple of .
Your task in this problem is to count the number of hot indices in a given .
For example, there are hot indices in , which are .
, → →
, → →
, → →
Note that both and are multiples of . On the other hand, the index is not hot as there does not exist an integer between and , inclusive, such that the only element in is a multiple of . The index is also not hot for a similar reason.
输入格式
Input begins with a line containing an integer: () representing the number of integers in . The next line contains integers: () representing the sequence of integers.
输出格式
Output in a line an integer representing the number of hot indices in the given .