#include <bits/stdc++.h>
using ll = long long;
using namespace std;
ll mod = 1e9 + 7;
ll n_pow(ll a, ll n) {
  if (n == 0) return 1;
  ll t = n_pow(a, n / 2);
  t *= t;
  if (n % 2 == 1) t *= a;
  return t;
}
const ll INF = 1e18;
int dx[] = {1, 0, -1, 0};
int dy[] = {0, 1, 0, -1};
ll cal_gcd(ll a, ll b) {
  ll m = max(a, b);
  ll n = min(a, b);
  while (m % n != 0) {
    ll b = m % n;
    m = n;
    n = b;
  }
  return n;
}
vector<pair<ll, ll>> prime_factorize(ll N) {
  vector<pair<ll, ll>> res;
  for (long long a = 2; a * a <= N; ++a) {
    if (N % a != 0) continue;
    long long ex = 0;
    while (N % a == 0) {
      ++ex;
      N /= a;
    }
    res.push_back({a, ex});
  }
  if (N != 1) res.push_back({N, 1});
  return res;
}
int main() {
  int n;
  cin >> n;
  vector<int> a(n);
  for (int i = 0; i < n; i++) {
    cin >> a[i];
  }
  int ans = 1000;
  int kabu = 1000 / a[0];
  ;
  int t = a[0];
  int kizyunn = a[0];
  for (int i = 1; i < n; i++) {
    if (a[i] == t) continue;
    if (a[i] < t) {
      kabu = ans / a[i];
      t = a[i];
      continue;
    }
    if (a[i] < kizyunn) continue;
    ans -= t * kabu;
    t = a[i];
    kizyunn = a[i];
    ans += t * kabu;
    kabu = 0;
  }
  cout << ans << endl;
  return 0;
}
