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