#include <bits/stdc++.h>
using namespace std;
mt19937 rng(chrono::high_resolution_clock::now().time_since_epoch().count());
void solve() {
  int n;
  cin >> n;
  vector<int> a(n);
  for (int i = 0; i < n; i++) cin >> a[i];
  int cur = 1000;
  for (int i = 0; i < n;) {
    bool is = 0;
    int j = i + 1;
    while (j < n && a[j - 1] <= a[j]) j++;
    if (j - i > 1) {
      int cnt = cur / a[i];
      cur %= a[i];
      cur += cnt * a[j - 1];
    }
    i = j;
  }
  cout << cur;
}
int main() {
  ios_base::sync_with_stdio(0);
  cin.tie(0);
  cout.tie(0);
  int q = 1;
  for (; q > 0; q--) {
    solve();
    cout << endl;
  }
}
