#include <bits/stdc++.h>
using namespace std;
const int N = 1e5 + 10;
int a[N], vis[N];
void check(int x) {
  if (x > 1) vis[x]++;
  for (int i = 2; i <= sqrt(x); i++) {
    if (x % i == 0) {
      vis[i]++;
      if (x / i != i) vis[x / i]++;
    }
  }
}
bool cmp(int a, int b) { return a > b; }
int main() {
  int n;
  scanf("%d", &n);
  for (int i = 0; i < n; i++) scanf("%d", &a[i]);
  int cnt = 0;
  sort(a, a + n);
  for (int i = 0; i < n; i++) {
    check(a[i]);
  }
  sort(vis, vis + N, cmp);
  printf("%d\n", max(vis[0], 1));
}
