#include <bits/stdc++.h>
using namespace std;
int main() {
  ios_base::sync_with_stdio(0), cin.tie(0), cout.tie(0);
  long n;
  cin >> n;
  long a[n];
  for (long i = 0; i < n; i++) cin >> a[i];
  vector<long> v;
  long long r = 1000;
  if (a[0] < a[1]) v.push_back(0);
  for (int i = 1; i < n - 1; i++) {
    if (v.size() % 2) {
      if (a[i - 1] <= a[i] && a[i] > a[i + 1]) v.push_back(i);
    } else {
      if (a[i - 1] > a[i] && a[i] <= a[i + 1]) v.push_back(i);
    }
  }
  if (v.size() % 2) v.push_back(n - 1);
  if (v.size() == 0) {
    cout << "1000\n";
    return 0;
  } else {
    for (long i = 0; i < v.size() - 1; i += 2) {
      r = (r / a[v[i]]) * a[v[i + 1]] + r % a[v[i]];
    }
  }
  cout << r << endl;
  return 0;
}
