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

#define IOS             ios_base::sync_with_stdio(false); cin.tie(NULL); cout.tie(NULL);
#define watch(x);       cout << "\n" <<  #x << " is: " << x << "\n";
#define ll              long long int
#define ff              first
#define ss              second
#define all(a)          a.begin(),a.end()
#define pb              push_back
#define nl              cout<<"\n"
#define gcd(a,b)        __gcd(a,b)
#define sq(a)           (a)*(a)
#define loop(i,a,b)     for (int i = a; i <= b; i++)
#define rloop(i,a,b)    for (int i = a; i >= b; i--)
#define sz(a)           a.size()
#define mod             1000000007
#define PI              2*acos(0.0)


int main()
{
    IOS
    int T=1;
    //cin>>T;
    while(T--)
    {
        int n;
        cin>>n;
        int a[n+1],mx=0;
        loop(i,0,n-1)
        {
            cin>>a[i];
        }
        int money=1000;
        int j=0;
        loop(i,0,n-2)
        {
            if(a[i+1]<=a[i])
            {
                ll stocks=money/a[j];
                money=(money-(stocks*a[j]))+stocks*a[i];
                j=i+1;
            }
        }
        if(j!=n-1)
        {
            ll stocks=money/a[j];
                money=(money-(stocks*a[j]))+(stocks*a[n-1]);
        }
        cout<<money;
        //nl;
    }
    return 0;
}
#include<bits/stdc++.h>
using namespace std;

#define IOS             ios_base::sync_with_stdio(false); cin.tie(NULL); cout.tie(NULL);
#define watch(x);       cout << "\n" <<  #x << " is: " << x << "\n";
#define ll              long long int
#define ff              first
#define ss              second
#define all(a)          a.begin(),a.end()
#define pb              push_back
#define nl              cout<<"\n"
#define gcd(a,b)        __gcd(a,b)
#define sq(a)           (a)*(a)
#define loop(i,a,b)     for (int i = a; i <= b; i++)
#define rloop(i,a,b)    for (int i = a; i >= b; i--)
#define sz(a)           a.size()
#define mod             1000000007
#define PI              2*acos(0.0)


int main()
{
    IOS
    int T=1;
    //cin>>T;
    while(T--)
    {
        int n;
        cin>>n;
        int a[n+1],mx=0;
        loop(i,0,n-1)
        {
            cin>>a[i];
        }
        int money=1000;
        int j=0;
        loop(i,0,n-2)
        {
            if(a[i+1]<=a[i])
            {
                ll stocks=money/a[j];
                money=(money-(stocks*a[j]))+stocks*a[i];
                j=i+1;
            }
        }
        if(j!=n-1)
        {
            ll stocks=money/a[j];
                money=(money-(stocks*a[j]))+(stocks*a[n-1]);
        }
        cout<<money;
        //nl;
    }
    return 0;
}
