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