#include <bits/stdc++.h>
using namespace std;
using ll = long long;
using pii = pair<int, int>;
using PII = pair<ll, ll>;
using piii = pair<pii, pii>;
using Pi = pair<int, pii>;
using Graph = vector<vector<int>>;
const int dx[4] = {0, -1, 1, 0};
const int dy[4] = {-1, 0, 0, 1};
bool check(int x, int y) {
  if (0 <= x && x < 55 && 0 <= y && y < 55)
    return true;
  else
    return false;
}
const ll INF = 1e9 + 7;
int gcd(int x, int y) {
  if (x < y) swap(x, y);
  if (y == 0) return x;
  return gcd(y, x % y);
}
void mul(ll a, ll b) { a = a * b % INF; }
using Graph = vector<vector<int>>;
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;
}
const double PI = 3.14159265358979323846;
const int MAX = 510000;
ll 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 % INF;
    inv[i] = INF - inv[INF % i] * (INF / i) % INF;
    finv[i] = finv[i - 1] * inv[i] % INF;
  }
}
ll 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] % INF) % INF;
}
double Euclidean_distance(double x1, double y1, double x2, double y2) {
  return sqrt((x1 - x2) * (x1 - x2) + (y1 - y2) * (y1 - y2));
}
map<int, int> prime_factor(int n) {
  map<int, int> res;
  for (int i = 2; i * i <= n; ++i) {
    while (n % i == 0) {
      ++res[i];
      n /= i;
    }
  }
  if (n != 1) res[n] = 1;
  return res;
}
ll powmod(ll a, ll k, ll mod) {
  ll ap = a, ans = 1;
  while (k) {
    if (k & 1) {
      ans *= ap;
      ans %= mod;
    }
    ap = ap * ap;
    ap %= mod;
    k >>= 1;
  }
  return ans;
}
ll invi(ll a, ll mod) { return powmod(a, mod - 2, mod); }
int main() {
  int n;
  cin >> n;
  int a[100];
  vector<int> v;
  int No = -1;
  for (int i = (0); i <= (n - 1); i++) {
    cin >> a[i];
    if (a[i] == No) continue;
    No = a[i];
    v.push_back(a[i]);
  }
  int ans = 1000;
  int cnt = 0;
  int i = 0;
  int N = v.size();
  while (true) {
    if (i == N - 1) {
      ans += cnt * v[i];
      break;
    } else {
      if (v[i] < v[i + 1]) {
        cnt += (ans / v[i]);
        ans -= v[i] * (ans / v[i]);
        i++;
      } else {
        ans += v[i] * cnt;
        cnt = 0;
        i++;
      }
    }
  }
  cout << ans << endl;
  return 0;
}
