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

#include <ext/pb_ds/assoc_container.hpp> 
#include <ext/pb_ds/tree_policy.hpp> 
using namespace __gnu_pbds; 
  
#define ordered_set tree<int, null_type,less<int>, rb_tree_tag,tree_order_statistics_node_update> 
#define ll long long

int main(){
	ios::sync_with_stdio(0);
	cin.tie(0);

	int n;
	cin >> n;
	int a[n+5] = {0};
	for(int i=1; i<=n; i++) cin >> a[i];
	int amt = 1000, stocks = 0;
	for(int i=2; i<=n; i++){
		if(a[i] > a[i-1]){
			stocks = amt/a[i-1];
			amt = amt - stocks*a[i-1];
			amt = amt + stocks*a[i];
			stocks = 0;
		}
	}
	cout << amt;
	return 0;
}