#include <bits/stdc++.h>
using namespace std;
int main() {
  long N;
  cin >> N;
  vector<long> data(N);
  for (int i = 0; i < N; i++) cin >> data.at(i);
  long ma;
  long mo = 1000, st = 0;
  for (int i = 0; i < N - 1; i++) {
    for (int j = i + 1; j < N; j++) {
      if (data.at(i) > data.at(j))
        break;
      else if (data.at(i) < data.at(j)) {
        st = mo / data.at(i);
        mo %= data.at(i);
        mo += data.at(j) * st;
        st = 0;
        i = j;
        break;
      }
    }
  }
  cout << mo << endl;
  return 0;
}
