#include <bits/stdc++.h>
using namespace std;
long long gcd(long long a, long long b) {
  if (a % b == 0) {
    return b;
  } else {
    return (gcd(b, a % b));
  }
}
long long lcm(long long a, long long b) { return a / gcd(a, b) * b; }
const int INF = 1e9;
const long long MX = 1e18;
const long long MOD = INF + 7;
const int di[] = {-1, 0, 1, 0};
const int dj[] = {0, -1, 0, 1};
const double PI = acos(-1);
const string tr = "abcdefghijklmnopqrstuvwxyz";
const long long MAX = 1000001;
long long fac[MAX], finv[MAX], inv[MAX];
void COMinit() {
  fac[0] = fac[1] = 1;
  finv[0] = finv[1] = 1;
  inv[1] = 1;
  for (long long i = 2; i < MAX; i++) {
    fac[i] = fac[i - 1] * i % MOD;
    inv[i] = MOD - inv[MOD % i] * (MOD / i) % MOD;
    finv[i] = finv[i - 1] * inv[i] % MOD;
  }
}
long long COM(long long n, long long k) {
  if (n < k) return 0;
  if (n < 0 || k < 0) return 0;
  return fac[n] * (finv[k] * finv[n - k] % MOD) % MOD;
}
long long llpow(long long n, long long i) {
  long long cnt = n;
  for (long long j = 0; j < i - 1; j++) {
    n *= cnt;
  }
  return n;
}
bool ip(long long N) {
  if (N == 1) return false;
  for (long long i = 2; i * i <= N; ++i) {
    if (N % i == 0) return false;
  }
  return true;
}
int digit(long long N) {
  int ans = 0;
  while (N) {
    ++ans;
    N /= 10;
  }
  return ans;
}
vector<pair<long long, long long>> pf(long long n) {
  vector<pair<long long, long long>> 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;
}
vector<long long> div(long long n) {
  vector<long long> res = {1};
  for (long long a = 2; a * a <= n; a++) {
    if (n % a != 0) continue;
    long long b = n / a;
    res.push_back(b);
    if (b != a) res.push_back(a);
  }
  sort(res.begin(), res.end());
  return res;
}
int main() {
  int n;
  cin >> n;
  vector<int> a(n);
  int m = 1000;
  for (long long i = 0; i < (n); i++) cin >> a[i];
  for (long long i = 0; i < (n - 1); i++) {
    if (a[i + 1] > a[i]) {
      int mc = m;
      m -= mc / a[i] * a[i];
      m += mc / a[i] * a[i + 1];
    }
  }
  cout << m << endl;
}
