#include <bits/stdc++.h>
using namespace std;
void solve() {
  int n;
  cin >> n;
  vector<int> v(n);
  for (int i = 0; i < (int)(n); ++i) {
    cin >> v[i];
  }
  long long curr = 1000;
  int i = 0;
  while (i < n) {
    cerr << "i"
         << ": " << i << "\n";
    int temp = v[i], temp1 = v[i];
    while (i < n && v[i] >= temp) {
      temp = v[i];
      i++;
    }
    if (i == n) {
      if (v[n - 1] <= temp1) break;
    }
    int pro = curr / temp1;
    curr -= (pro * temp1);
    curr += (pro * temp);
  }
  cout << curr << "\n";
}
int main() {
  ios_base::sync_with_stdio(false);
  cin.tie(NULL);
  cout.tie(NULL);
  ;
  long long t = 1;
  while (t--) {
    solve();
  }
}
