#include <bits/stdc++.h>
using namespace std;
vector<int> v;
int n;
int main() {
  cin >> n;
  for (int i = 0; i < n; i++) {
    int x;
    cin >> x;
    v.push_back(x);
  }
  int amt = 1000;
  int ma = v[0], mi = v[0];
  for (int i = 1; i < n; i++) {
    if (v[i] < v[i - 1]) {
      int bal = amt / mi;
      bal = (amt - (bal * mi)) + (bal * ma);
      amt = bal;
      mi = ma = v[i];
    } else {
      mi = min(mi, v[i]);
      ma = max(ma, v[i]);
    }
  }
  int bal = amt / mi;
  bal = (amt - (bal * mi)) + (bal * ma);
  amt = bal;
  cout << amt << "\n";
}
