#include <bits/stdc++.h>
using namespace std;
int main() {
  int N;
  cin >> N;
  vector<int> stock_price(N);
  int money = 1000;
  int stock = 0;
  vector<int> diff(N - 1, 0);
  vector<int> list(N - 2, 0);
  for (int i = 0; i < (N); ++i) {
    int tmp;
    cin >> tmp;
    stock_price[i] = tmp;
    if (i > 0) {
      if (stock_price[i] > stock_price[i - 1]) {
        diff[i - 1] = 1;
      } else if (stock_price[i] < stock_price[i - 1]) {
        diff[i - 1] = -1;
      }
    }
  }
  for (int i = 0; i < (N - 1); ++i) {
    if (diff[i] > 0) {
      if ((stock > 0) && (i > 1)) {
        money = money + stock * stock_price[i - 1];
        stock = 0;
      }
      stock = money / stock_price[i];
      money = money - stock_price[i] * stock;
    } else if ((diff[i] < 0) && (stock > 0)) {
      money = money + stock * stock_price[i];
    }
  }
  if (stock > 0) {
    money = money + stock * stock_price[N - 1];
  }
  cout << money << endl;
  return 0;
}
