#include <bits/stdc++.h>
using namespace std;
using ll = long long;
using P = pair<int, int>;
int main() {
  ll N;
  cin >> N;
  vector<ll> A(N);
  for (int i = 0; i < (N); ++i) cin >> A.at(i);
  ll money = 1000;
  ll max_money = 1000;
  ll stock = 0;
  for (int i = 0; i < (N); ++i) {
    if (i == N - 1) {
      money += stock * A.at(i);
      max_money = max(max_money, money);
      break;
    }
    if (A.at(i) < A.at(i + 1)) {
      stock = money / A.at(i);
      money -= stock * A.at(i);
    } else if (A.at(i) > A.at(i + 1)) {
      money += stock * A.at(i);
      max_money = max(max_money, money);
      stock = 0;
    }
  }
  cout << max_money << endl;
}
