#include <stdio.h>
#include <stdlib.h>
#include <math.h>


#define rep(i,r,l) for(int i = r; i < l; i++)
#define elif else if
#define ll long long
int nextint(void){int n;scanf("%d",&n);return n;}
void printint(int d){printf("%d\n",d);}


int main(void){ 

    int n;
    scanf("%d",&n);
    int a[n+1]={0};
    rep(i,1,n+1){
        a[i] = nextint();
    }
    long long int sum=1000;
    int x=1;
    rep(i,1,n+1){
        if(a[i]<=a[x])x=i;
        elif(a[i]>a[x]&&a[i+1]<a[i]){
            sum+=((sum/a[x])*(a[i]-a[x]));
            x=i+1;
        }
    }
    printint(sum
    

    
    return 0;
}