#include <bits/stdc++.h>
using namespace std;
using ll = long long;
using ld = long double;
using vl = vector<ll>;
using vll = vector<vl>;
using Pll = pair<ll, ll>;
const int MOD = 1e9 + 7;
const ll INF = 2e15;
template <class T>
void print(const T& t) {
  cout << t << endl;
}
template <class T>
inline bool chmax(T& a, T b) {
  if (a < b) {
    a = b;
    return 1;
  }
  return 0;
}
template <class T>
inline bool chmin(T& a, T b) {
  if (a > b) {
    a = b;
    return 1;
  }
  return 0;
}
ll gcd(ll a, ll b) { return b ? gcd(b, a % b) : a; }
int main() {
  ll n;
  cin >> n;
  vl a(n);
  for (ll i = 0; i < (ll)(n); i++) {
    cin >> a[i];
  }
  vector<bool> high(n, false);
  vector<bool> low(n, false);
  for (ll i = 0; i < (ll)(n - 1); i++) {
    for (ll j = i + 1; j < n; j++) {
      if (a[j] > a[i]) {
        high[i] = true;
      } else if (a[j] < a[i]) {
        low[i] = true;
      }
    }
  }
  ll money = 1000;
  ll stack = 0;
  for (ll i = 0; i < (ll)(n); i++) {
    if (low[i]) {
      money += a[i] * stack;
      stack = 0;
    } else if (high[i]) {
      stack += money / a[i];
      money -= a[i] * (money / a[i]);
    } else {
      money += a[i] * stack;
      stack = 0;
    }
  }
  print(money);
}
