#include <bits/stdc++.h>
using namespace std;
int main() {
  int N;
  cin >> N;
  vector<int> A(N + 1);
  for (int i = 0; i < N; i++) cin >> A.at(i);
  A.at(N) = 0;
  int mon = 1000;
  int sto = 0;
  for (int i = 0; i < N; i++) {
    mon += A.at(i) * sto;
    sto = 0;
    if (A.at(i) < A.at(i + 1)) {
      sto = mon / A.at(i);
      mon = mon - sto * A.at(i);
    }
  }
  cout << mon << endl;
}
