#include <bits/stdc++.h>
using namespace std;
const double PI = 3.14159265358979323846;
vector<pair<long long, long long>> prime_factorize(long long n) {
  vector<pair<long long, long long>> res;
  for (long long p = 2; p * p <= n; ++p) {
    if (n % p != 0) continue;
    int num = 0;
    while (n % p == 0) {
      ++num;
      n /= p;
    }
    res.push_back(make_pair(p, num));
  }
  if (n != 1) res.push_back(make_pair(n, 1));
  return res;
}
vector<long long> calc_divisor(long long n) {
  vector<long long> res;
  for (long long i = 1LL; i * i <= n; ++i) {
    if (n % i == 0) {
      res.push_back(i);
      long long j = n / i;
      if (j != i) res.push_back(j);
    }
  }
  sort(res.begin(), res.end());
  return res;
}
long long int gcd(long long int x, long long int y) {
  return y ? gcd(y, x % y) : x;
}
long long int gcd(const vector<long long int>& v) {
  long long int ret = v[0];
  for (long long int i = 1; i < v.size(); i++) ret = gcd(ret, v[i]);
  return ret;
}
long long int lcm(long long int x, long long int y) {
  return x / gcd(x, y) * y;
}
long long int lcm(const vector<long long int>& v) {
  long long int ret = v[0];
  for (long long int i = 1; i < v.size(); i++) ret = lcm(ret, v[i]);
  return ret;
}
void to_lower(string& x) {
  for (long long int i = 0; i < x.length(); i++)
    if ('A' <= x[i] && x[i] <= 'Z') {
      x[i] -= 'A' - 'a';
    }
}
void to_bigger(string& x) {
  for (long long int i = 0; i < x.length(); i++)
    if ('a' <= x[i] && x[i] <= 'z') {
      x[i] += 'A' - 'a';
    }
}
vector<pair<long long, long long>> g[200020];
long long int s[200020];
bool used[200020];
long long int A, B, C, D, E, F, G, H, I, J, K, L, M, N, O, Q, R, S, T, U, V, W,
    X, Y, Z;
double dA, dB, dC, dH, dK, dM, dN, dQ, dR, dS, dT, dW, dX, dY;
int main() {
  cin.tie(0);
  ios::sync_with_stdio(false);
  long long ans, ans1, ans2, ans3, ans4;
  long long sum, sum1, sum2, sum3, sum4;
  long long cnt, cnt1, cnt2, cnt3, cnt4;
  long long flg, flg1, flg2, flg3, flg4;
  long long wk, wk1, wk2, wk3, wk4;
  long long max, max1, max2, max3, max4;
  long long min, min1, min2, min3, min4;
  ans = ans1 = ans2 = ans3 = ans4 = 0;
  sum = sum1 = sum2 = sum3 = sum4 = 0;
  cnt = cnt1 = cnt2 = cnt3 = cnt4 = 0;
  flg = flg1 = flg2 = flg3 = flg4 = 0;
  wk = wk1 = wk2 = wk3 = wk4 = 0;
  max = max1 = max2 = max3 = max4 = 0;
  min = min1 = min2 = min3 = min4 = 1e18 + 5;
  double dwk, dwk1, dwk2, dwk3, dwk4;
  double dsum, dsum1, dsum2, dsum3, dsum4;
  double dans, dans1, dans2, dans3, dans4;
  dwk = dwk1 = dwk2 = dwk3 = dwk4 = 0;
  dsum = dsum1 = dsum2 = dsum3 = dsum4 = 0;
  dans = dans1 = dans2 = dans3 = dans4 = 0;
  cin >> N;
  vector<long long int> v(N);
  for (long long i = 0; i < N; i++) {
    cin >> v[i];
  }
  long long int kabu;
  long long int kane;
  kane = 1000;
  kabu = 0;
  for (long long i = 0; i < N - 1; i++) {
    if (v[i] < v[i + 1]) {
      flg = 1;
    }
  }
  if (flg == 0) {
    printf("%lld", kane);
    return 0;
  }
  for (long long i = 0; i < N; i++) {
    if (i == 0) {
      kabu = kane / v[0];
      if (kane % v[0] != 0) {
        kane = kane - v[0] * (kane / v[0]);
      } else {
        kane = 0;
      }
    } else if (i == N - 1) {
      kane += kabu * v[N - 1];
    } else {
      if (v[i - 1] < v[i]) {
        kane += kabu * v[i];
        kabu = 0;
      } else if (v[i - 1] == v[i]) {
      } else {
        kabu = kane / v[i];
        if (kane % v[i] != 0) {
          kane = kane - v[i] * (kane / v[i]);
        } else {
          kane = 0;
        }
      }
    }
  }
  printf("%lld", kane);
  return 0;
  return 0;
}
