#include <bits/stdc++.h>
using namespace std;
int main() {
  int n;
  cin >> n;
  int kabu = 0;
  int money = 1000;
  vector<int> a(n);
  for (int i = 0; i < n; i++) cin >> a.at(i);
  for (int i = 0; i < n; i++) {
    if (i == n - 1)
      money += a.at(i) * kabu;
    else {
      if (a.at(i) < a.at(i + 1)) {
        kabu = money / a.at(i);
        money -= kabu * a.at(i);
      } else if (a.at(i) > a.at(i + 1)) {
        money += kabu * a.at(i);
        kabu = 0;
      }
    }
  }
  cout << money << endl;
}
