#include <bits/stdc++.h>
using namespace std;
#define ll           long long
#define all(v)       (v).begin() , (v).end()
#define vi           vector <ll>
#define vii          vector <pair<ll,ll>>
#define ii           pair<ll,ll>
#define sz(v)	     ((int)((v).size()))
#define lp(i,a,b)    for(int i=a;i<b;i++)
#define pb           push_back
#define pf           push_front
#define F            first
#define S            second
#define endl         "\n"
#define IOS          ios::sync_with_stdio(0); cin.tie(0); cout.tie(0);
const double PI = 3.14159265358979323846;
const ll inf=2e9,MOD=998244353,MAX=1e2+2;

int n;
int a[82];

int main(){
    IOS;
    cin>>n;
    ll res=1000,mn=inf;
    lp(i,0,n){
        cin>>a[i];
        if(i){
            if(a[i]<=a[i-1])
                mn=min(mn,a[i]);
            else{
                int cnt=res/mn;
                res=res-cnt*mn;
                res=res+cnt*a[i];
                mn=a[i];
            }

        }
        else mn=a[i];
    }
    cout<<res;

}
/*

*/
