#include <bits/stdc++.h>
using namespace std;
using ll = long long;
using ld = long double;
using pint = pair<int, int>;
using pll = pair<ll, ll>;
using pld = pair<ld, ld>;
const int INF = 1e9 + 7;
const ll LINF = 9223372036854775807;
const ll MOD = 1e9 + 7;
const ld PI = acos(-1);
const ld EPS = 1e-10;
int ii() {
  int x;
  if (scanf("%d", &x) == 1)
    return x;
  else
    return 0;
}
long long il() {
  long long x;
  if (scanf("%lld", &x) == 1)
    return x;
  else
    return 0;
}
string is() {
  string x;
  cin >> x;
  return x;
}
char ic() {
  char x;
  cin >> x;
  return x;
}
void oi(int x) { printf("%d ", x); }
void ol(long long x) { printf("%lld ", x); }
void od_nosp(double x) { printf("%.15f", x); }
void od(double x) { printf("%.15f ", x); }
void os(const string& s) { printf("%s ", s.c_str()); }
void oc(const char& c) { printf("%c ", c); }
void br() { putchar('\n'); }
template <typename T1, typename T2>
ostream& operator<<(ostream& s, const pair<T1, T2>& p) {
  return s << "(" << p.first << " " << p.second << ")";
}
template <typename T>
ostream& operator<<(ostream& s, const vector<T>& v) {
  int len = v.size();
  for (int i = 0; i < len; ++i) {
    s << v[i];
    if (i < len - 1) s << " ";
  }
  return s;
}
template <typename T>
ostream& operator<<(ostream& s, const vector<vector<T> >& vv) {
  int len = vv.size();
  for (int i = 0; i < len; ++i) {
    s << vv[i] << endl;
  }
  return s;
}
template <typename T>
bool chmax(T& a, T b) {
  return (a = max(a, b)) == b;
}
template <typename T>
bool chmin(T& a, T b) {
  return (a = min(a, b)) == b;
}
vector<int> dx_4 = {1, 0, -1, 0};
vector<int> dy_4 = {0, 1, 0, -1};
int main() {
  ll N = il();
  vector<ll> as;
  for (ll i = (ll)(0); i < (ll)(N); i++) {
    as.push_back(il());
  }
  ll money = 1000;
  ll kabu = 0;
  for (ll i = (ll)(0); i < (ll)(N); i++) {
    ll today = as[i];
    ll flag = 1;
    bool oncedown = false;
    if (i == N - 1) {
      money += kabu * today;
      kabu = 0;
    } else {
      for (ll j = (ll)(i + 1); j < (ll)(N); j++) {
        if (today < as[j]) {
          if (oncedown) {
            flag = 2;
            break;
          } else {
            flag = 0;
            break;
          }
        } else if (today > as[j]) {
          oncedown = true;
          flag = 3;
        } else {
          if (oncedown) {
            flag = 1;
          } else {
            continue;
          }
        }
      }
    }
    if (flag == 0) {
      ll purchace = money / today;
      money -= today * purchace;
      kabu += purchace;
    } else if (flag == 2) {
      money += kabu * today;
      kabu = 0;
    } else if (flag == 3) {
      money += kabu * today;
      kabu = 0;
    }
  }
  cout << money << endl;
}
