#include <bits/stdc++.h>
int main(void) {
  int64_t N;
  std::cin >> N;
  std::vector<int64_t> prices(N);
  for (auto& price : prices) {
    std::cin >> price;
  }
  int64_t stock = 0;
  int64_t asset = 1000;
  if (prices.at(0) < prices.at(1)) {
    stock = asset / prices.at(0);
    asset = asset % prices.at(0);
  }
  for (int64_t i = 1; i < N - 1; ++i) {
    int64_t temp_stock = 0;
    if (prices.at(i - 1) >= prices.at(i) && prices.at(i) < prices.at(i + 1)) {
      temp_stock = asset / prices.at(i);
      if (temp_stock != 0) {
        stock += temp_stock;
        asset = asset % prices.at(i);
      }
    }
    if (prices.at(i - 1) <= prices.at(i) && prices.at(i) > prices.at(i + 1)) {
      asset += stock * prices.at(i);
      stock = 0;
    }
  }
  if (prices.at(N - 2) < prices.at(N - 1)) {
    asset += stock * prices.at(N - 1);
    stock = 0;
  }
  std::cout << asset << std::endl;
  return 0;
}
