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