#include <bits/stdc++.h>
using namespace std;
int main() {
  int N;
  cin >> N;
  vector<int> a(N);
  for (int i = 0; i < N; i++) {
    cin >> a.at(i);
  }
  int amount = 1000;
  int stock = 0;
  for (int i = 0; i < N - 1; i++) {
    for (int j = i + 1; j < N; j++) {
      if (a.at(i) >= a.at(j)) {
        i = j;
        break;
      } else if (a.at(i) < a.at(j)) {
        stock = amount / a.at(i);
        amount += stock * (a.at(j) - a.at(i));
        stock = 0;
        i = j;
        break;
      }
    }
  }
  cout << amount << endl;
}
