#include <bits/stdc++.h>
using namespace std;
using ll = long long;
using vi = vector<int>;
namespace {
template <class T>
void show(T& x) {
  cout << x << " ";
}
template <class T>
void showendl(T& x) {
  cout << x << endl;
}
template <class P, class Q>
void show(pair<P, Q>& x) {
  cout << "(" << x.first << ", " << x.second << ") ";
}
template <class P, class Q>
void showendl(pair<P, Q>& x) {
  cout << "(" << x.first << ", " << x.second << ")" << endl;
}
template <class H>
void debug(H&& h) {
  showendl(h);
}
template <class H, class... Ts>
void debug(H&& h, Ts&&... ts) {
  show(h);
  debug(forward<Ts>(ts)...);
}
template <class T>
void debug(vector<T>& vt) {
  int i = 0;
  for (auto x : vt) ++i != vt.size() ? show(x) : showendl(x);
}
template <class T>
void debug(initializer_list<T> init) {
  int i = 0;
  for (auto x : init) ++i != init.size() ? show(x) : showendl(x);
}
}  // namespace
int main() {
  int N;
  cin >> N;
  vi A(N);
  for (int i = 0; i < (int)N; i++) cin >> A[i];
  int money = 1000;
  vi list;
  for (int i = 0; i < N; i++) {
    list.push_back(A[i]);
    if (i == N - 1) {
      if (!list.empty()) {
        int buy = money / list.front();
        money -= buy * list.front();
        money += buy * list.back();
      }
      break;
    }
    if (A[i] <= A[i + 1]) {
      ;
    } else {
      int buy = money / list.front();
      money -= buy * list.front();
      money += buy * list.back();
      list.clear();
    }
  }
  cout << money << endl;
}
