#include <bits/stdc++.h>
using namespace std;
struct Fast {
  Fast() {
    cin.tie(0);
    ios::sync_with_stdio(false);
    cout << fixed << setprecision(20);
  }
} fast;
using namespace std;
long long mod = 1000000007;
long long modpow(long long m, long long n) {
  if (n == 0) return 1;
  if (n % 2 == 0) {
    long long t = modpow(m, n / 2);
    return (t * t) % mod;
  } else {
    return (modpow(m, n - 1) * m) % mod;
  }
}
bool bitcheck(long long x, long long y) { return (x >> y) & 1; }
template <typename A, size_t N, typename T>
void Fill(A (&array)[N], const T& val) {
  std::fill((T*)array, (T*)(array + N), val);
}
long long power(long long m, long long n) {
  if (n == 0) return 1;
  if (n % 2 == 0) {
    long long t = modpow(m, n / 2);
    return t * t;
  } else {
    return modpow(m, n - 1) * m;
  }
}
long long moddiv(long long a, long long b) {
  return (a * modpow(b, mod - 2)) % mod;
}
const long long INF = 1LL << 60;
void print_binary(long long a) {
  for (int i = 31; i >= 0; i--) {
    cout << (a >> i & 1);
  }
  cout << endl;
}
long long nCkmod(long long n, long long k) {
  long long denomi = 1;
  for (int i = n; i > n - k; i--) {
    denomi *= i;
    denomi %= mod;
  }
  long long numera = 1;
  for (long long i = 0; i < (k); i++) {
    numera *= (i + 1);
    numera %= mod;
  }
  return moddiv(denomi, numera);
}
map<long long, long long> cnt;
void primeFactors(long long n) {
  while (n % 2 == 0) {
    cnt[2]++;
    n = n / 2;
  }
  for (int i = 3; i <= sqrt(n); i = i + 2) {
    while (n % i == 0) {
      cnt[i]++;
      n = n / i;
    }
  }
  if (n > 2) {
    cnt[n]++;
  }
}
int main() {
  long long n;
  cin >> n;
  vector<long long> as(n);
  for (long long i = 0; i < (n); i++) {
    cin >> as[i];
  }
  vector<long long> turpoint;
  vector<long long> turpcost;
  bool bought = false;
  for (long long i = 1; i < (n); i++) {
    if (as[i] > as[i - 1]) {
      turpoint.push_back(i - 1);
      bought = true;
    }
    if (as[i] < as[i - 1] && bought == true) {
      turpoint.push_back(i - 1);
    }
  }
  long long curmoney = 1000;
  long long curshares = 0;
  bool bs = false;
  for (auto x : turpoint) {
    if (bs == false) {
      curshares = curmoney / as[x];
      curmoney = curmoney % as[x];
      bs = true;
    } else {
      curmoney = curmoney + curshares * as[x];
      curshares = 0;
      bs = false;
    }
  }
  if (bs == true) {
    cout << curmoney + curshares * as[n - 1] << endl;
  } else {
    cout << curmoney << endl;
  }
}
