using System;
using System.Collections;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using static System.Console;
using static System.Math;
using static AtCoderTemplate.MyLibrary;

namespace AtCoderTemplate
{
    class Program
    {
        static void Main (string[] args)
        {
            string[] str;
            str = Console.ReadLine ().Split (' ');
            int N = int.Parse (str[0]);

            str = Console.ReadLine ().Split (' ');

            int[] A = new int[N + 2];
            List<int> M = new List<int> ();

            A[0] = 300;
            A[N + 1] = 0;
            int m = 1000;
            int tmp = 300;
            for (int i = 1; i <= N; i++)
            {
                A[i] = int.Parse (str[i - 1]);
                if (tmp > A[i]) tmp = A[i];

                if (A[i - 1] < A[i] && A[i] > A[i + 1])
                {
                    m = (m / tmp) * A[i] + m % tmp;
                    tmp = 300;
                }
            }
            Console.WriteLine (m);

        }
    }

    class MyLibrary
    {
        public static int GCD (int a, int b)
        {
            if (a % b == 0) return b;
            return GCD (b, a % b);
        }
    }
}