#include <bits/stdc++.h>
using namespace std;
int main() {
  int N, money = 1000, money2 = 1000, kabu;
  int max = 100, min = 200, doko = 1, doko2 = 0;
  bool finish = false;
  cin >> N;
  vector<int> A(N);
  for (int i = 0; i < N; i++) {
    cin >> A.at(i);
    if (max < A.at(i)) {
      max = A.at(i);
      doko = i;
    } else if (doko > i && min >= A.at(i)) {
      min = A.at(i);
    }
  }
  kabu = money2 / min;
  money2 -= kabu * min;
  money2 += kabu * max;
  for (int i = 1; i < N; i++) {
    if (A.at(i - 1) < A.at(i)) {
      kabu = (money / A.at(i - 1));
      money -= (kabu * A.at(i - 1));
      money += kabu * A.at(i);
    }
  }
  int ans = std::max(money, money2);
  cout << ans << endl;
}
