#include <bits/stdc++.h>
using namespace std;
int main() {
  int N;
  cin >> N;
  long long money = 1000;
  int64_t kabu = 0;
  vector<int> A(N);
  for (int i = 0; i < N; i++) {
    cin >> A.at(i);
  }
  A.erase(unique(A.begin(), A.end()), A.end());
  vector<bool> B(A.size());
  if (A.size() > 1) {
    for (int i = 0; i < A.size(); i++) {
      if (i > 0) {
        if (A.at(i - 1) < A.at(i)) {
          B.at(i - 1) = true;
        } else {
          B.at(i - 1) = false;
        }
      }
      if (i == A.size() - 1) {
        B.at(i) = B.at(i - 1);
      }
    }
  }
  int R;
  if (A.size() > 2) {
    for (int i = 0; i < A.size(); i++) {
      if (i == 0 && B.at(i) == true) {
        R = money / A.at(i);
        money -= A.at(i) * R;
        kabu += R;
      } else if (i == A.size() - 1 && B.at(i) == true) {
        money += kabu * A.at(i);
        kabu = 0;
      }
      if (i > 0) {
        if (B.at(i - 1) == false && B.at(i) == true) {
          R = money / A.at(i);
          money -= A.at(i) * R;
          kabu += R;
        } else if (B.at(i - 1) == true && B.at(i) == false) {
          money += kabu * A.at(i);
          kabu = 0;
        }
      }
    }
  }
  cout << money << endl;
}
