#include <bits/stdc++.h>
using namespace std;
int buy(int *money, int *stock, int stock_price);
int sell(int *money, int *stock, int stock_price);
int main() {
  int N;
  cin >> N;
  int money = 1000;
  int stock = 0;
  vector<int> A(N);
  for (int i = 0; i < N; i++) {
    cin >> A.at(i);
  }
  for (int day = 0; day < N - 1; day++) {
    if (A.at(day) < A.at(day + 1)) {
      buy(&money, &stock, A.at(day));
    } else if (A.at(day) > A.at(day + 1)) {
      sell(&money, &stock, A.at(day));
    }
  }
  sell(&money, &stock, A.at(N - 1));
  cout << money << endl;
  return 0;
}
int buy(int *money, int *stock, int stock_price) {
  *stock += *money / stock_price;
  *money -= *money / stock_price * stock_price;
  return 0;
}
int sell(int *money, int *stock, int stock_price) {
  *money += *stock * stock_price;
  *stock = 0;
  return 0;
}
