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