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