#include <cmath>
#include <cstdio>
#include <vector>
#include <iostream>
#include <algorithm>
#include <functional>
#include <map>
#include <set>
#include <deque>
#include <queue>
#include <limits>
#include <sstream>
#include <typeinfo>

using namespace std;

#define MOD 1000000007

int main() {
	int N;
	cin >> N;
	std::vector<int> x(N);
	for (int i = 0; i < N; i++) {
		cin >> x[i];
	}
	sort(x.begin(), x.end());
	int ans = 0;
	for (int i = 0; i < N - 1; i++) {
		int n = 1;
		int a = x[i];
		for (int j = i + 1; j < N; j++) {
			int b = x[j];
			if (b % a == 0) {
				a = b;
				n++;
			}
		}
		ans = max(ans, n);
	}
	cout << ans << endl;
	return 0;
}