#include <bits/stdc++.h>
using namespace std;
using ll = long long;
using vi = vector<int>;
using pi = pair<int, int>;
void setIO() {
  ios_base::sync_with_stdio(0);
  cin.tie(0);
}
int main() {
  setIO();
  ll n;
  cin >> n;
  vector<ll> vals;
  for (int i = 0; i < n; i++) {
    ll x;
    cin >> x;
    vals.push_back(x);
  }
  int start = 0;
  int cur = 1000;
  while (start < n) {
    int trade = 0;
    for (int j = start + 1; j < n; j++) {
      if (vals[j] < vals[start]) {
        start = j;
        trade = 1;
        break;
      }
      if (vals[j] > vals[start]) {
        int num_stock = cur / vals[start];
        int profit = num_stock * (vals[j] - vals[start]);
        cur += profit;
        start = j;
        trade = 1;
        break;
      }
    }
    if (trade == 0) break;
  }
  cout << cur << endl;
  return 0;
}
