#include<bits/stdc++.h>
using namespace std;
int main(){
int N;
cin>>N;
  int arr[N];
int currentMoney=1000;
  for(int i=0;i<N:i++)
    	cin>>arr[i];
  for(int i=1;i<=N-1;i++)
  {
    int s=0;
    if(arr[i]<arr[i+1]) stocks=currentMoney/arr[i];
    currentMoney+=(arr[i+1]-arr[i])*stocks;
  }
  cout<<currentMoney<<endl;
}