#include <bits/stdc++.h>
using namespace std;
template <typename T>
using vec = vector<T>;
int main() {
  int n;
  cin >> n;
  vec<int> a(n + 1);
  for (int i = 0; i < n; i++) {
    cin >> a.at(i);
  }
  a.at(n) = 0;
  vec<int> delta_a(n);
  for (int i = 0; i < n; i++) {
    delta_a.at(i) = a.at(i + 1) - a.at(i);
    cerr << delta_a.at(i) << " ";
  }
  cerr << endl;
  int day_buy = 0;
  int day_sell = 0;
  int shojikinn = 1000;
  int kabu = 0;
  for (int i = 0; i < n; i++) {
    if (delta_a.at(i) < 0 and delta_a.at(i - 1) >= 0) {
      kabu = shojikinn / a.at(day_buy);
      shojikinn -= kabu * a.at(day_buy);
      shojikinn += kabu * a.at(day_sell);
      kabu = 0;
    }
    if (delta_a.at(i) >= 0) {
      day_sell = i;
    }
    if (delta_a.at(i) < 0) {
      day_buy = i;
    }
    cerr << i << " " << shojikinn << " " << day_buy << " " << day_sell << endl;
  }
  cout << shojikinn << endl;
}
