
// Problem: A - twiblr
// Contest: AtCoder - AtCoder Beginner Contest 182
// URL: https://atcoder.jp/contests/abc182/tasks/abc182_a
// Memory Limit: 1024 MB
// Time Limit: 2000 ms
// Powered by CP Editor (https://github.com/cpeditor/cpeditor)

#include <bits/stdc++.h>
using namespace std;
#define ff         first
#define ss         second
#define endl       '\n'
#define pb         push_back
#define int        long long
#define vi         vector<int>
#define mii        map<int, int>
#define pii        pair<int, int>
#define all(x)     (x).begin(), (x).end()
#define fill(a,b)  memset(a, b, sizeof(a))
#define setbits(x) __builtin_popcountll(x)
#define rep(i,x,y) for(int i=(int)x; i<y; i++)
#define px(a)      for(auto x: a) cout<<x<<" "; cout<<'\n';
#define pxy(a,n)   rep(i,0,n) {px(a[i])};

const long long MOD=1e9+7,N=1e5+5;

int solve()
{
	int n,ans=0; cin>>n;	
	vi a(n); rep(i,0,n) cin>>a[i];
	px(a);
	return ans;
}
int32_t main()
{	
	std::ios::sync_with_stdio(false);
	cin.tie(0); cout.tie(0);
	//Remove incase of Online Query
	
	int a,b;
	cin>>a>>b;
	cout<<abs(2*a+100-b)<<endl;
}
#include <bits/stdc++.h>
#define int long long
#define IOS std::ios::sync_with_stdio(false); cin.tie(NULL);cout.tie(NULL);
#define pb push_back
#define mod 998244353
//#define lld long double
#define mii map<int, int>
#define mci map<char, int>
#define msi map<string, int>
#define pii pair<int, int>
#define ff first
#define ss second
#define bs(yup,x) binary_search(yup.begin(),yup.end(),x) //it will return bollean value
#define lb(yup,x) lower_bound(yup.begin(),yup.end(),x)  //it will return the adress of the number which is equal to or just greater than x ,and if it is equal to yup.end() than their in no such number exist
#define ub(yup,x) upper_bound(yup.begin(),yup.end(),x)
#define all(x) (x).begin(), (x).end()
#define rep(i,x,y) for(int i=x; i<y; i++)
#define fill(a,b) memset(a, b, sizeof(a))
#define vi vector<int>
#define setbits(x) __builtin_popcountll(x)
using namespace std;
const long long N=1000, INF=2000000000000000000;
int power(int a, int b, int p)
    {
        if(a==0)
        return 0;
        int res=1;
        a%=p;
        while(b>0)
        {
            if(b&1)
            res=(res*a)%p;
            b>>=1;
            a=(a*a)%p;
        }
        return res;
    }
vi prime;
bool isprime[N];
void pre()
{
    for(int i=2;i<N;i++)
    {
        if(isprime[i])
        {
            for(int j=i*i;j<N;j+=i)
            isprime[j]=false;
            prime.pb(i);
        }
    }
    return;
}
 
int32_t main()
{
    
    IOS;
    //fill(isprime, true);
    //pre();
    int t=1;
    //cin>>t;
    while(t--)
    {
        pii p[1001];
        rep(i,0,1001)
        {
            p[i].ff=0;
            p[i].ss=i;
        }
        int n;
        cin>>n;
        int a[n];
        rep(i,0,n)
        {
            cin>>a[i];
            rep(j,2,1001)
            {
                if(a[i]%j==0) p[j].ff++;
            }
        }
        sort(p,p+1001);
        cout<<p[1000].ss;
        
    }
}
 