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