// Arup Guha
// Solution to 2016 NCPC Problem: Daydreaming Stockbroker
// 4/12/2017

import java.util.*;

public class d {

	final public static int MAXSHARES = 100000;

	public static int[] vals;
	public static int n;

	public static void main(String[] args) {

		Scanner stdin = new Scanner(System.in);
		n = stdin.nextInt();
		vals = new int[n];

		// Read in the values.
		for (int i=0; i<n; i++)
			vals[i] = stdin.nextInt();

		// Solve and output.
		System.out.println(solve());
	}

	public static long solve() {

		// Remove repeats.
		ArrayList<Integer> list = new ArrayList<Integer>();
		list.add(vals[0]);
		int i = 0;
		while (i < n) {
			int j = i;
			while (j < n && vals[j] == vals[i]) j++;
			if (j < n) list.add(vals[j]);
			i = j;
		}

		// Avoid out of bounds.
		if (list.size() == 1) return 100;

		ArrayList<Integer> prices = new ArrayList<Integer>();
		boolean dir = list.get(1) > list.get(0);
		prices.add(list.get(0));
		i = 0;

		// Now only store peaks and valleys.
		while (i+1 < list.size()) {

			// Going up.
			if (dir) {
				while (i+1 < list.size() && list.get(i+1) > list.get(i)) i++;
				prices.add(list.get(i));
			}

			// Going down.
			else {
				while (i+1 < list.size() && list.get(i+1) < list.get(i)) i++;
				prices.add(list.get(i));
			}
			dir = !dir;
		}

		// Where we start buying...
		int start = prices.get(0) > prices.get(1) ? 1 : 0;

		long cash = 100;
		int shares = 0;

		// Go through pairs of operations of buying low and selling high.
		for (i=start; i+1<prices.size(); i+=2) {
			int newshares = (int)(Math.min(MAXSHARES, shares + cash/prices.get(i)));
			cash -= prices.get(i)*(newshares-shares);
			shares = newshares;
			cash += prices.get(i+1)*shares;
			shares = 0;
		}

		// Here is our answer.
		return cash;
	}
}