#include <bits/stdc++.h>
int main(int argc, char *argv[]) {
  int n;
  std::cin >> n;
  std::vector<int> a(n);
  int money = 1000;
  for (int i = 0; i < n; ++i) {
    std::cin >> a.at(i);
    if (i > 0) {
      if (a.at(i) > a.at(i - 1)) {
        int kabu = money / a.at(i - 1);
        money -= a.at(i - 1) * kabu;
        money += a.at(i) * kabu;
      }
    }
  }
  std::cout << money << std::endl;
}
