#Lutece0923. 稳住GCD

稳住GCD

Migrated from Lutece 923 稳住GCD

All parts of this problem, including description, images, samples, data and checker, might be broken. If you find bugs in this problem, please contact the admins.

Description

给你一组数,a1,a2,a3,,ana_1, a_2, a_3,\cdots,a_n

令:

G=gcd(a1,a2,a3,,an)G=\gcd(a_1, a_2, a_3,\cdots,a_n)

现在从中任意删除一些数字,设剩下的数为:al1,al2,al3,,alma_{l_1}, a_{l_2}, a_{l_3},\cdots, a_{l_m}

再令:

g=gcd(al1,al2,al3,,alm)g=\gcd(a_{l_1}, a_{l_2}, a_{l_3},\cdots, a_{l_m})

现要求G=gG=g,问最多能删除多少数?

Input

第一行一个数nn,第二行nn个数a1,a2,a3,,ana_1, a_2, a_3,\cdots,a_n

1n7001\leq n\leq 700

1ai100001\leq a_i\leq 10000

Output

输出只有一个数,表示最多能删除多少数。

Samples

3
4 6 8
1

Resources

2014 UESTC ACM Training for Math