#include <bits/stdc++.h>
using namespace std;
const double mx = 2e6 + 5;
void solve() {
  int n;
  cin >> n;
  int money = 1000;
  int stocks = 0;
  vector<int> price(n + 1);
  for (int i = 0; i < n; i++) cin >> price[i];
  int day = 1;
  while (day < n) {
    while (day < n && price[day - 1] >= price[day]) day++;
    stocks = money / price[day - 1];
    money -= (stocks * price[day - 1]);
    while (day < n && price[day - 1] <= price[day]) day++;
    money += (stocks * price[day - 1]);
    stocks = 0;
  }
  cout << money << "\n";
}
int main() {
  ios_base::sync_with_stdio(false);
  cin.tie(NULL);
  int t = 1;
  while (t--) {
    solve();
  }
  return 0;
}
