static int count;
static List numbers = new List();
static void Main(string[] args)
{
int n = Convert.ToInt32(Console.ReadLine());
int k = Convert.ToInt32(Console.ReadLine());
for (int i = 0; i < 5; i++)
{
numbers.Add(Convert.ToInt32( Console.ReadLine()));
}
foreach (var item in numbers)
{
if (item % k == 0)
count++;
}
Console.Write(count);