#include <bits/stdc++.h>
using namespace std;
using ll = long long;
using P = pair<int, int>;
int main() {
  int n;
  cin >> n;
  vector<int> a(n);
  for (int i = 0; i < (n); ++i) cin >> a.at(i);
  int stock = 0;
  int balance = 1000;
  for (int i = 0; i < n - 1; ++i) {
    if (a.at(i) < a.at(i + 1)) {
      if (balance < a.at(i)) continue;
      stock += balance / a.at(i);
      balance = balance % a.at(i);
    } else {
      if (stock == 0) continue;
      balance += stock * a.at(i);
      stock = 0;
    }
  }
  if (stock != 0) {
    balance += stock * a.at(n - 1);
    stock = 0;
  }
  cout << balance << endl;
  return 0;
}
