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