#include <stdio.h>

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