#include <bits/stdc++.h>
using namespace std;
using Graph = vector<vector<int>>;
int main() {
  int N;
  cin >> N;
  vector<int> A(N);
  for (int i = 0; i < (N); ++i) cin >> A[i];
  int M = 1000;
  vector<int> Adiv;
  int reset_flag = 1;
  Adiv.push_back(0);
  for (int i = 1; i < N; i++) {
    if (A[i - 1] > A[i]) {
      Adiv.push_back(i);
    }
  }
  int Anow = 0;
  for (int i = 0; i < (Adiv.size()); ++i) {
    Anow = M / A[Adiv[i]];
    M = M - Anow * A[Adiv[i]];
    if (!i == Adiv.size() - 1)
      M = M + Anow * A[Adiv[i + 1] - 1];
    else
      M = M + Anow * A[N - 1];
  }
  cout << M << endl;
  return 0;
}
