#include <bits/stdc++.h>
using namespace std;
using ll = long long;
using ld = long double;
const ll INF = 1000000000;
const ld PI = (acos(-1));
using Graph = vector<vector<int>>;
template <class T>
inline bool chmin(T& a, T b) {
  if (a > b) {
    a = b;
    return true;
  }
  return false;
}
template <class T>
inline bool chmax(T& a, T b) {
  if (a < b) {
    a = b;
    return true;
  }
  return false;
}
double rad(double a) { return a * 180 / PI; }
struct UnionFind {
  vector<int> par;
  UnionFind(int N) : par(N) {
    for (int i = 0; i < N; i++) par[i] = i;
  }
  int root(int x) {
    if (par[x] == x) return x;
    return par[x] = root(par[x]);
  }
  void unite(int x, int y) {
    int rx = root(x);
    int ry = root(y);
    if (rx == ry) return;
    par[rx] = ry;
  }
  bool same(int x, int y) {
    int rx = root(x);
    int ry = root(y);
    return rx == ry;
  }
};
int dp[100050];
int main() {
  int N;
  cin >> N;
  vector<int> A(N);
  for (int i = 0; i < (N); i++) cin >> A.at(i);
  int kabu = 0, moneynow = 1000;
  for (int i = 0; i < N - 1; i++) {
    if (i >= 1 && A.at(i) > A.at(i - 1)) {
      moneynow += kabu * A.at(i);
      kabu = 0;
    } else if (A.at(i) < A.at(i + 1)) {
      kabu = moneynow / A.at(i);
      moneynow = moneynow - kabu * A.at(i);
    }
  }
  if (kabu != 0) moneynow += A.at(N - 1) * kabu;
  cout << moneynow << endl;
  return 0;
}
