import java.io.*;
import java.math.*;
import java.util.*;
import java.util.regex.*;


public class Main {

	final static long MOD = 1000000007;
	public static String[] Ws = null;
	public static int wsIndx = 0;
	public static BufferedReader in = null;
	public static long cnt=0;
	public static PrintWriter pw = new PrintWriter(System.out);
	public static void main(String[] args) throws Exception {
//		solveA(args);
//		solveB(args);
//		solveC(args);
		solveD(args);
//		solveE(args);
//		solveF(args);
		if(in!=null){
			in.close();
		}
		pw.flush();
		pw.close();
	}

	public static void solveA(String[] args) throws Exception{
		int N= nextInt();
		for(int i=1;i<=8;i++) {
			if(2000-i*200<=N && N<=2199-i*200) {
				pw.println(i);
				break;
			}
		}

	}
	public static void solveB(String[] args) throws Exception{
		int A = nextInt();
		int B = nextInt();
		int C = nextInt();
		int K = nextInt();

		for(int i=0;i<K;i++) {
			if(C<=B) {
				C*=2;
			}else if(B<=A) {
				B*=2;
			}
			if(C>B&&B>A) {
				pw.println("Yes");
				return;
			}
		}
		pw.println("No");
	}
	public static void solveC(String[] args) throws Exception{
		int N = nextInt();
		int K = nextInt();
		int[] A = nextInts();

		for(int i=K;i<N;i++) {
			if(A[i-K]>=A[i]) {
				pw.println("No");
			}else {
				pw.println("Yes");
			}
		}


	}

	public static void solveD(String[] args) throws Exception{
		int N = nextInt();
		int[] A = nextInts();
		long[] dp = new long[N+10];

		Arrays.fill(dp,1000);
		for(int i=1;i<=N;i++) {
			long kabu = dp[i-1]/A[i-1];
			long tmp = dp[i-1]-kabu*A[i-1];
			long max = 0;
			for(int k=i+1;k<=N;k++) {
				dp[k]=Math.max(dp[k],tmp+kabu*A[k-1]);
				max=Math.max(max,tmp+kabu*A[k-1]);
			}
			if(dp[i]<max) {
				dp[i]=tmp;
			}
		}
		pw.println(dp[N]);

	}


	public static void solveE(String[] args) throws Exception{

	}

	public static void solveF(String[] args) throws Exception{

	}

	public static void check() throws Exception{
		if(in == null){
			in = new BufferedReader(new InputStreamReader(System.in));
		}
		if(Ws==null || Ws.length<=wsIndx){
			Ws = in.readLine().split(" ");
			wsIndx=0;
		}
	}
	public static int nextInt()throws Exception{
		check();
		return Integer.parseInt(Ws[wsIndx++]);
	}

	public static long nextLong()throws Exception{
		check();
		return Long.parseLong(Ws[wsIndx++]);
	}

	public static String nextString()throws Exception{
		check();
		return Ws[wsIndx++];
	}

	public static int[] nextInts()throws Exception{
		check();
		int[] tmp = new int[Ws.length];
		for(int i=0;i<tmp.length;i++){
			tmp[i]=Integer.parseInt(Ws[i]);
		}
		wsIndx=Ws.length;
		return tmp;
	}

	public static long[] nextLongs()throws Exception{
		check();
		long[] tmp = new long[Ws.length];
		for(int i=0;i<tmp.length;i++){
			tmp[i]=Long.parseLong(Ws[i]);
		}
		wsIndx=Ws.length;
		return tmp;
	}

	public static String[] nextStrings()throws Exception{
		check();
		wsIndx=Ws.length;
		return Ws;
	}

}

