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