#include <bits/stdc++.h>
using namespace std;
using ull = unsigned long long;
using i64 = int64_t;
using u64 = uint64_t;
using u32 = uint32_t;
constexpr int64_t MOD = 1000000007LL;
template <class T>
std::tuple<T> input() {
  T x;
  std::cin >> x;
  return std::make_tuple(x);
}
template <class T, class U, class... Args>
std::tuple<T, U, Args...> input() {
  auto first = input<T>();
  auto rest = input<U, Args...>();
  return std::tuple_cat(first, rest);
}
template <class T>
std::vector<T> input_vec(std::size_t size) {
  std::vector<T> vec(size);
  for (std::size_t i = 0; i < size; i++) cin >> vec[i];
  return vec;
}
template <class T>
std::vector<T> input_vec(std::size_t size, T fill_value) {
  std::vector<T> vec(size, fill_value);
  for (std::size_t i = 0; i < size; i++) cin >> vec[i];
  return vec;
}
void solve() {
  auto [N] = input<int>();
  vector<int> A(N);
  for (i64 i = (0), ixxxx_end = (N); i < ixxxx_end; ++i) {
    cin >> A[i];
  }
  int money = 1000;
  for (i64 i = (1), ixxxx_end = (N); i < ixxxx_end; ++i) {
    if (A[i] > A[i - 1]) {
      int a = money / A[i - 1];
      money += a * (A[i] - A[i - 1]);
    }
  }
  cout << money << endl;
}
int main() {
  solve();
  return 0;
}
