#include <stdio.h>

void main(){
    int N,A[80],G = 1000,a;
    scanf("%d",&N);
    for(int i = 0;i < N;i++){
        scanf("%d",A+i);
    }
    for(int i = 0;i < N-1;i++){
        if(A[i] < A[i+1]){
            a = G/A[i];
            G = G%A[i];
            G = G + a*A[i+1];
        }
    }
    printf("%d\n",G);
}