#include <bits/stdc++.h>
struct A {
  long money;
  long kabu;
};
long solve(int n, const std::vector<int>& prices) {
  A sisan{1000, 0};
  for (int i = 0; i < n; ++i) {
    const int p = prices[i];
    sisan.money += p * sisan.kabu;
    sisan.kabu = 0;
    if (i < n - 1 && p < prices[i + 1]) {
      const int c = sisan.money / p;
      sisan.money -= p * c;
      sisan.kabu += c;
    }
  }
  return sisan.money;
}
int main() {
  int n;
  std::cin >> n;
  std::vector<int> prices(n);
  for (auto& p : prices) {
    std::cin >> p;
  }
  std::cout << std::setprecision(20);
  std::cout << solve(n, prices) << std::endl;
}
