#include <bits/stdc++.h>
using namespace std;
template <typename T>
bool chmax(T &a, T b) {
  if (a < b) {
    a = b;
    return true;
  }
  return false;
}
template <typename T>
bool chmin(T &a, T b) {
  if (a > b) {
    a = b;
    return true;
  }
  return false;
}
const long long mod = 1e9 + 7;
const int inf = 1 << 30;
const long long lnf = 1ll << 60;
int main() {
  int n;
  cin >> n;
  long long money = 1000;
  vector<int> v(n);
  for (int i = 0; i < (int)(n); i++) cin >> v[i];
  vector<int> b(0);
  vector<int> s(0);
  if (v[0] < v[1]) b.push_back(0);
  for (int i = 1; i <= (int)(n - 2); i++) {
    if (v[i - 1] < v[i] && v[i] >= v[i + 1]) s.push_back(i);
    if (v[i - 1] >= v[i] && v[i] < v[i + 1]) b.push_back(i);
  }
  if (v[n - 2] < v[n - 1]) s.push_back(n - 1);
  for (int i = 0; i < (int)(b.size()); i++) {
    if (upper_bound(s.begin(), s.end(), b[i]) != s.end()) {
      if (i)
        money = money % v[b[i]] +
                money / v[b[i]] * v[*upper_bound(s.begin(), s.end(), b[i])];
    }
  }
  cout << money << endl;
}
