#include <bits/stdc++.h>
int main() {
  int n, money = 1000, stocks = 0;
  std::cin >> n;
  std::vector<int> day(n), sell(n + 1, 1);
  for (int i = 0; i < n; i++) std::cin >> day[i];
  day.resize(std::unique(day.begin(), day.end()) - day.begin());
  day.push_back(day.back());
  for (int i = 0; i < day.size(); i++)
    if (day[i] < day[i + 1])
      stocks += money / day[i], money %= day[i];
    else
      money += day[i] * stocks, stocks = 0;
  std::cout << money;
}
