#include <bits/stdc++.h>
using namespace std;
void solve() {
  int n;
  cin >> n;
  vector<int> v(n);
  for (int i = 0; i < n; ++i) cin >> v[i];
  int amt = 1000, stc;
  for (int i = 0; i < n; ++i) {
    int j = i;
    while (v[i] <= v[i + 1] && i < n - 1) i++;
    if (i != j) {
      stc = amt / v[j];
      amt -= stc * v[j];
      amt += stc * v[i];
    }
  }
  cout << amt;
}
int main() {
  ios::sync_with_stdio(0);
  cin.tie(0);
  int t = 1;
  while (t--) solve();
}
