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