#include <bits/stdc++.h>
using namespace std;
using ll = long long;
int main() {
  ll n = 0;
  cin >> n;
  vector<ll> nedan(n);
  for (ll i = 0; i < n; i++) {
    cin >> nedan[i];
  }
  ll money = 1000;
  ll kabu = 0;
  ll tmpNedan = nedan[0];
  for (ll i = 1; i < n; i++) {
    if (tmpNedan < nedan[i]) {
      kabu = money / tmpNedan;
      money -= kabu * tmpNedan;
    } else if (tmpNedan > nedan[i]) {
      money += kabu * tmpNedan;
      kabu = 0;
    }
    tmpNedan = nedan[i];
  }
  cout << money + kabu * tmpNedan << endl;
  return 0;
}
