2
157 193#include<bits/stdc++.h>
#define rep(i, n) for(int i = 0; i < (n); ++i)

using namespace std;
using ll = long long;
using v1 = vector<int>;
using vl = vector<long long>;
using v2 = vector<vector<int>>;
using v3 = vector<vector<char>>;


int main(){
	int n;
	cin >> n;
	v1 a(n+1);
	rep(i, n){
		cin >> a[i+1];
	}
	ll x =1000;
	int m = 0;
	for(int i = 1; i <= n-1; i++){
		x += a[i]*m;
		m=0;
		if(a[i+1]>a[i]){
			m = x/a[i];
			x %= a[i];
		}
	}
	if(m != 0) x+= m*a[n];
	cout << x << endl;
}
