#include <bits/stdc++.h>
using namespace std;
using ll = long long;
using vl = vector<ll>;
int main() {
  ll n;
  cin >> n;
  vl a(n);
  for (int i = 0; i < (n); i++) cin >> a[i];
  ll money = 1000, stock = 0, max_money = 1000;
  for (int i = 0; i < (n - 1); i++) {
    if (a[i] < a[i + 1]) {
      stock += money / a[i];
      money %= a[i];
      if (i == n - 2) {
        money += stock * a[i + 1];
        stock = 0;
      }
    }
    if (a[i] > a[i + 1]) {
      money += a[i] * stock;
      stock = 0;
    }
    max_money = max(money, max_money);
  }
  cout << max_money << endl;
}
