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