#include <bits/stdc++.h>
using namespace std;
int main() {
  ios_base::sync_with_stdio(false);
  cin.tie(0);
  cout.tie(0);
  long long int n, tk = 1000, st = 0;
  cin >> n;
  long long int ar[100];
  long long int fl = 0;
  for (long long int i = 1; i <= n; i++) {
    cin >> ar[i];
    if (i != 1 && ar[i] > ar[i - 1]) fl = 1;
  }
  if (fl == 0) {
    cout << "1000" << '\n';
  } else {
    for (long long int i = 1; i <= n - 1; i++) {
      if (ar[i] >= ar[i + 1] && st != 0) {
        tk = tk + (st * ar[i]);
        st = 0;
      } else if (ar[i] < ar[i + 1]) {
        st = tk / ar[i];
        tk = tk - (st * ar[i]);
      }
    }
    if (st != 0) tk = tk + (st * ar[n]);
    cout << tk << '\n';
  }
}
