#include <bits/stdc++.h>
using namespace std;
using ll = long long;
using P = pair<int, int>;
const int INF = 1001001001;
const ll LINF = 1001001001001001;
const int MOD = 1000000007;
template <typename T>
void print(const T &v);
int main() {
  int n;
  cin >> n;
  vector<int> a(n);
  vector<int> pnt(n);
  for (int i = 0; i < n; i++) {
    cin >> a[i];
  }
  int mode = 1;
  for (int i = 0; i < n - 1; i++) {
    if (mode % 2 == 1 && a[i] < a[i + 1]) {
      pnt[i] = 1;
      mode++;
    } else if (mode % 2 == 0 && a[i] > a[i + 1]) {
      pnt[i] = 2;
      mode++;
    }
  }
  pnt[n - 1] = 2;
  ll money = 1000;
  ll kb = 0;
  vector<int> his;
  his.push_back(1000);
  for (int i = 0; i < n; i++) {
    if (pnt[i] == 1) {
      kb = money / a[i];
      money %= a[i];
    } else if (pnt[i] == 2) {
      money += kb * a[i];
      kb = 0;
      his.push_back(money);
    }
  }
  sort(his.begin(), his.end());
  cout << his[his.size() - 1] << endl;
  return 0;
}
template <typename T>
void print(T const &v) {
  for (int i = 0; i < v.size(); i++) {
    if (i) cout << ' ';
    cout << v[i];
  }
  cout << endl;
}
