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