#include <bits/stdc++.h>
using namespace std;
/* * * *   * * *   	* * * */
typedef long long ll;
typedef long double ld;
typedef pair<int, int> pii;
/* * * *   * * *   	* * * */
/* *
 *
 * I love Ylva Eriksson
 *
 * */
int main(){
	ios_base::sync_with_stdio(0), cin.tie(0), cout.tie(0);
	//freopen("input.txt", "r", stdin);
	//freopen("output.txt", "w", stdout);
	int n; cin >> n;
	vector <int> a(n);
	for (int i = 0; i < n; ++i) cin >>a[i];
	int cnt = 0, ans= 0;
	for (int i = 2; i <= 1000; ++i) {
		int cur = 0;
		for (int j = 0; j < n; ++j) cur += (a[j] % i == 0);
		if (cur > cnt) {cnt = cur, ans = i; }
	}
	cout << ans << '\n';
	return 0;
}

#include <bits/stdc++.h>
using namespace std;
long long mod=1e9+7,ans,n;
int main ()
{
    ios::sync_with_stdio(false);
    cin.tie(0);
    cin >> n;
    long long a[n+1],f[n+1];
    for(int i=1;i<=n;i++) cin >> a[i];
    f[0]=1,f[1]=1;
    for(int i=2;i<=n;i++) f[i]=(f[i-1]+f[i-2])%mod;
     ans=(f[n]*a[1])%mod;
    for(int i=2;i<=n;i++)
    {
        ans+=(f[n+1-i]*f[i-1]%mod*2%mod+mod-f[n])%mod*a[i]%mod;
		ans%=mod;
    }
    cout << ans;
}
