#include <iostream>
#include <vector>
using namespace std;
int main() {
  int N, t;
  cin >> N;
  vector<int> p(N);
  for(int i = 0; i != N; ++i) {
    cin >> t;
    p.push_back(t);
  }
  money = 1000;
  stock = 0;
  for(int i = 0; i < N - 1; ++i) {
    if( p[i] < p[i+1] ) {
      stock = money / p[i];
      money -= stock * p[i];
    } else if( p[i] < p[i+1] ) {
      money += stock * p[i];
      stock = 0;
    }
  }
  money += stock * p[N-1];
  cout << money << "\n";
  
}