#include <bits/stdc++.h>
using namespace std;
void solve(int N, vector<int> A) {
  int m = 1000;
  int p_b, p_s;
  p_b = A.at(0);
  for (int i = 1; i < N; i++) {
    if (A.at(i - 1) > A.at(i)) {
      p_s = A.at(i - 1);
      int n_stock = m / p_b;
      m += n_stock * (p_s - p_b);
      p_b = A.at(i);
    }
  }
  p_s = A.at(N - 1);
  int n_stock = m / p_b;
  m += n_stock * (p_s - p_b);
  cout << m << endl;
}
int main() {
  int N;
  cin >> N;
  vector<int> A(N);
  for (int i = 0; i < N; i++) {
    cin >> A.at(i);
  }
  solve(N, move(A));
  return 0;
}
