#include <bits/stdc++.h>
using namespace std;
int dx[4] = {0, 0, 1, -1};
int dy[4] = {1, -1, 0, 0};
const long long MOD = 1000000007;
const int MAX = 200000;
long long fac[MAX], finv[MAX], inv[MAX];
void COMinit() {
  fac[0] = fac[1] = 1;
  finv[0] = finv[1] = 1;
  inv[1] = 1;
  for (int 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(int n, int 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 modinv(long long a, long long m) {
  long long b = m, u = 1, v = 0;
  while (b) {
    long long t = a / b;
    a -= t * b;
    swap(a, b);
    u -= t * v;
    swap(u, v);
  }
  u %= m;
  if (u < 0) u += m;
  return u;
}
long long modpow(long long a, long long n, long long mod) {
  long long res = 1;
  while (n > 0) {
    if (n & 1) res = res * a % mod;
    a = a * a % mod;
    n >>= 1;
  }
  return res;
}
long long gcd(long long x, long long y) {
  if (y == 0)
    return x;
  else
    return gcd(y, x % y);
}
long long lcm(long long x, long long y) { return x / gcd(x, y) * y; }
long long com[200005];
void combination(long long n, long long k) {
  com[0] = 1;
  for (int i = 1; i <= k; i++) {
    com[i] = (com[i - 1] * (n - i + 1) % MOD) * modinv(i, MOD) % MOD;
  }
}
int main() {
  int N;
  cin >> N;
  vector<int> A(N + 1);
  long long c = 1000;
  int k = 0;
  int t = 0;
  for (int i = 0; i < N; i++) {
    cin >> A[i];
  }
  A[N] = 0;
  for (int i = 0; i < N; i++) {
    if (A[i] < A[i + 1]) {
      k = c / A[i];
      c -= A[i] * k;
      c += A[i + 1] * k;
    }
  }
  cout << c << endl;
  return 0;
}
