#include<bits/stdc++.h>
using namespace std ; 
# define pb push_back
# define ll long long
# define mp make_pair 
# define endl "\n"
# define vi vector<int>
# define vc vector<char>
# define vll vector<ll> 
# define pi pair<int,int> 
const int MOD = 1e9 + 7 ; 
const ll inf = 1e18 ; 


int rec(int cur , int pos, int cost, int stocks) {
	if(pos >= n) 
		return INT_MIN ; 
	if(stocks < 0)
		return INT_MIN ;
	int  i = pos ;  
	if(pos == n-1) {
		return stocks + cur*a[i] ; 
	}

	// option 0 pass 
	int t0 = rec(cur, pos + 1 , cost, stocks) ; 
	// option 1 buy
	int t1 = rec(cur + (stocks/a[i]) , pos + 1 , cost , stocks%a[i] ) ; 
	// option 2 sell 
	int t2 = rec(0 , pos+ 1 , cur*a[i] , stocks+cur*a[i]) ; 

	// option 3 sell and buy 
	int new_stocks  = stocks + cur*a[i] ; 
	int t3 = rec(new_stocks/a[pos] , pos + 1 , cost  , new_stocks%a[i]) ; 


	return max(max(t0,t1),max(t2,t3)) ; 
}

int main() {
	int n ; 
	cin >> n ; 
	vi a(n) ; 
	for(int i = 0 ; i < n ; ++i)
		cin >> a[i] ;
	ll ans = 1000 ; 
	//int max_so_far = 0 ; 
	for(int i = 1 ; i < n ; ++i) {
		if(a[i] >= a[i-1]) {
			//ans %= a[i-1] ; 
			int tmp = ans / a[i-1] ; 
			ans %= a[i-1] ; 
			ans += (ll)tmp*a[i] ; 
		}
	}
	cout << ans ; 
	return 0; 
}
