//   g++ cpp.cpp && ./a.out

#define mod 1000000007

#include<iostream>
#include<vector>

using namespace std;

typedef long long ll;

int main(){

	int n;

	cin >> n;

	int max = 0;
	vector<int> a(n);
	for (int i = 0; i < n; i++){
		cin >> a[i];
		if (a[i] > max)
			max = a[i];
	}

	int ans;
	int cmax = 0;
	for (int i = 2; i <= max; i++)
	{
		int c = 0;
		for (int j = 0; j < n; j++)
		{
			if(a[j]%i==0)
				c++;
		}
		if(c>cmax){
			cmax = c;
			ans = i;
		}
	}

	cout << ans << endl;

	return 0;

}
#include <bits/stdc++.h>
using namespace std;

signed  main(){
	int N, i, ans = 0;
	scanf("%d", &N);
	for(i = 0; i < N; i++){
		int A;
		scanf("%d", &A);
		ans += max(A - 10, 0);
	}
	printf("%d\n", ans);
	return 0;
}