#include <bits/stdc++.h>
using namespace std;
int main() {
  int n;
  cin >> n;
  vector<int> v(n);
  for (int i = 0; i < n; ++i) cin >> v[i];
  int money = 1000;
  int stocks = 0;
  stocks = (money / v[0]);
  money = money - (stocks * v[0]);
  int buy = 0, sell = 1;
  for (int i = 1; i < n - 1; ++i) {
    if (sell) {
      if (v[i] > v[i + 1]) {
        money += (stocks * v[i]);
        stocks = 0;
        sell = 0;
        buy = 1;
      }
    } else if (buy) {
      if (v[i] < v[i + 1]) {
        stocks = (money / v[i]);
        money = money - (stocks * v[i]);
        sell = 1;
        buy = 0;
      }
    }
  }
  if (stocks > 0) money += stocks * v[n - 1];
  cout << max(1000, money);
}
