#include <bits/stdc++.h>
using namespace std;
int main() {
  int N, money = 1000, kabu;
  cin >> N;
  vector<int> A(N);
  for (int i = 0; i < N; i++) {
    cin >> A.at(i);
  }
  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);
    }
  }
  cout << money << endl;
}
