#include <iostream>
#include <vector>

using namespace std;

int main(){
  int N;
  cin >> N;
  vector<int> A;
  
  for (int i=0; i<N; i++){
    int a;
    cin >> a;
    A.push_back(a);
  }
  
  int j=0;
  int M=1000;
  int S=0;
  while (j<N){
    if (A[j]>A[j+1]){ M += S*A[j]; S=0}
    else if (A[j]<A[j+1]){ S = M/A[j]; M -= S*A[j]}
    j++;
  }
  M += S*A[j];
  cout << M;
}