#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);
  vector<int> bns(N);
  for (int i = 0; i < (N - 1); i++) {
    if (A.at(i) < A.at(i + 1))
      bns.at(i) = 0;
    else if (A.at(i) > A.at(i + 1))
      bns.at(i) = 2;
    else
      bns.at(i) = 1;
  }
  bns.at(N - 1) = 2;
  int money = 1000, stock = 0;
  for (int i = 0; i < (N); i++) {
    if (bns.at(i) == 1) continue;
    if (bns.at(i) == 0) {
      stock += money / A.at(i);
      money -= stock * A.at(i);
    }
    if (bns.at(i) == 2) {
      money += stock * A.at(i);
      stock = 0;
    }
  }
  cout << money << endl;
}
