#include <bits/stdc++.h>
using namespace std;
template <typename T = int>
T in() {
  T a;
  cin >> a;
  return a;
}
int main() {
  int n;
  cin >> n;
  int current_money = 1000;
  int current_stock = 0;
  int values[n];
  for (int i = 0; i < (n); ++i) {
    cin >> values[i];
  }
  for (int i = 0; i < (n - 1); ++i) {
    if (values[i] < values[i + 1]) {
      int quantity = current_money / values[i];
      current_stock += quantity;
      current_money -= quantity * values[i];
    } else if (values[i] > values[i + 1]) {
      current_money += current_stock * values[i];
      current_stock = 0;
    }
  }
  cout << current_money + current_stock * values[n - 1];
  cout << "\n";
  return 0;
}
