#include <bits/stdc++.h>
using namespace std;
int main() {
  int N, K = 0, i = 0;
  long Y = 1000;
  cin >> N;
  vector<int> A(N);
  for (int j = 0; j < (int)(N); j++) cin >> A.at(j);
  while (i < N - 1) {
    if (A.at(i) >= A.at(i + 1) && K == 0)
      i++;
    else if (A.at(i) < A.at(i + 1) && K == 0) {
      K += Y / A.at(i);
      Y -= A.at(i) * (Y / A.at(i));
      i++;
    } else if (A.at(i) <= A.at(i + 1) && K != 0)
      i++;
    else if (A.at(i) > A.at(i + 1) && K != 0) {
      Y += K * A.at(i);
      K = 0;
      i++;
    }
  }
  if (K != 0) {
    Y += K * A.at(N - 1);
    K = 0;
  }
  cout << Y << endl;
}
