#include <bits/stdc++.h>
int main() {
  uint32_t N = 0;
  std::cin >> N;
  std::vector<uint32_t> A(N);
  for (auto &&a : A) std::cin >> a;
  uint32_t money = 1000, stock = 0;
  for (size_t i = 1; i < N; i++) {
    if (A[i - 1] < A[i]) {
      stock += money / A[i - 1];
      money = money % A[i - 1];
    } else if (A[i - 1] > A[i]) {
      money += A[i - 1] * stock;
      stock = 0;
    }
  }
  std::cout << money + stock * A.back() << std::endl;
  return 0;
}
