#include <bits/stdc++.h>
using namespace std;
const long long MOD = (long long)(1e9 + 7);
const long long INF = (long long)(1e13 + 7);
const double EPS = 1e-14;
const double PI = acos(-1);
long long CEIL(long long a, long long b) {
  return (a >= 0 ? (a + (b - 1)) / b : (a - (b - 1)) / b);
}
long long mod(long long a, long long b) {
  return a >= 0 ? a % b : a - (b * CEIL(a, b));
}
long long bpm(long long a, long long b) {
  long long res = 1;
  for (a %= MOD; b; a = a * a % MOD, b >>= 1)
    if (b & 1) res = res * a % MOD;
  return res;
}
class DRoadToMillionaire {
 public:
  static void solve(istream &cin, ostream &cout) {
    long long N;
    cin >> N;
    vector<long long> A(N);
    for (long long i = 0; i < (long long)(N); i++) cin >> A[i];
    vector<long long> ans;
    long long a = 0;
    for (long long i = 0; i < (long long)(N - 1); i++) {
      if (a) {
        if (A[i + 1] < A[i]) {
          ans.emplace_back(A[i]);
          a = 0;
        }
      } else {
        if (A[i + 1] > A[i]) {
          ans.emplace_back(A[i]);
          a = 1;
        }
      }
    }
    if (A[N - 1] > A[N - 2] and a == 1) {
      ans.emplace_back(A[N - 1]);
    }
    long long now_mon = 1000;
    long long now_kabu = 0;
    for (long long i = 0; i < (long long)(ans.size()); i++) {
      if (i % 2 == 0) {
        now_kabu = now_mon / ans[i];
        now_mon -= now_kabu * ans[i];
      } else {
        now_mon += now_kabu * ans[i];
      }
    }
    cout << now_mon << endl;
  }
};
signed main() {
  cin.tie(0);
  cout.tie(0);
  ios_base::sync_with_stdio(false);
  cout << fixed << setprecision(15);
  DRoadToMillionaire solver;
  std::istream &in(std::cin);
  std::ostream &out(std::cout);
  solver.solve(in, out);
  return 0;
}
