#include <bits/stdc++.h>
using namespace std;
long long MOD = 1000000007;
struct edge {
  long long to, cost;
};
long long modpow(long long a, long long x) {
  if (a < 0) a += MOD;
  long long ans = 1;
  while (x > 0) {
    if (x & 1) ans = ans * a % MOD;
    a = a * a % MOD;
    x >>= 1;
  }
  return ans;
}
long long gyaku(long long n) { return modpow(n, MOD - 2); }
map<long long, long long> factor(long long n) {
  map<long long, long long> res;
  for (long long i = 2; i * i <= n; i++) {
    for (; n % i == 0; n /= i) res[i]++;
  }
  if (n > 1) res[n]++;
  return res;
}
signed main() {
  long long n;
  cin >> n;
  vector<long long> a(n);
  for (long long i = 0; i < (long long)(n); i++) cin >> a[i];
  long long motikabu = 0, gold = 1000;
  for (long long i = 0; i < (long long)(n - 1); i++) {
    if (a[i] < a[i + 1]) {
      motikabu = gold / a[i];
      gold -= motikabu * a[i];
    } else {
      gold += motikabu * a[i];
      motikabu = 0;
    }
  }
  gold += motikabu * a[n - 1];
  cout << gold << endl;
}
