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