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