#include <bits/stdc++.h>
using namespace std;
template <class T>
void mkmin(T& a, const T b) {
  a = min(a, b);
}
template <class T>
void mkmax(T& a, const T b) {
  a = max(a, b);
}
mt19937 rng(chrono::steady_clock::now().time_since_epoch().count());
const long long mod = 1e9 + 7;
const long long OO = 1e18;
const int oo = 2e9;
const int N = 85;
int n, a[N], ans;
int main() {
  cin >> n;
  for (int i = 1; i <= n; i++) cin >> a[i];
  bool buy = true;
  int cur = 1000, last = 1000, stocks = 0, lastRes = 1000;
  for (int i = 1; i <= n; i++) {
    if (buy && a[i] < last) {
      last = a[i];
      stocks = cur / a[i];
      cur %= a[i];
      buy = false;
    } else if (!buy && a[i] > last) {
      last = a[i];
      cur += stocks * a[i];
      lastRes = cur;
      stocks = 0;
      buy = true;
    }
  }
  if (!buy) cur = lastRes;
  cout << cur;
}
