#include <bits/stdc++.h>
using namespace std;
int main() {
  int n;
  cin >> n;
  long long a[n];
  for (int i = 0; i < n; i++) cin >> a[i];
  vector<int> v;
  v.push_back(a[0]);
  for (int i = 1; i < n; i++) {
    if (a[i - 1] != a[i]) v.push_back(a[i]);
  }
  long long tk = 1000, stock = 0;
  for (int i = 0; i < v.size() - 1; i++) {
    if (v[i] < v[i + 1]) {
      int temp = tk / v[i];
      tk = tk - temp * v[i];
      stock += temp;
    } else if (v[i] > v[i + 1]) {
      tk += stock * v[i];
      stock = 0;
    }
  }
  cout << tk + stock * v[n - 1] << endl;
  return 0;
}
