using System;
using System.Linq;

namespace M_solutions2020
{
    class Program
    {
        static void Main(string[] args)
        {
            //c();
            d();
        }

        public static void c()
        {
            long[] nk = Console.ReadLine().Split(' ').Select(long.Parse).ToArray();
            long n = nk[0], k = nk[1];
            long[] a = Console.ReadLine().Split(' ').Select(long.Parse).ToArray();
            long sum = 1;
            for(long i = 0; i < k; i++)
            { sum *= a[i]; }
            for(long i = k; i < n ; i++)
            {
                long j = k;
                long sum1 = 1;
                if (a[i - j] == 0)
                { sum1 = 0; }
                else
                { sum1 = sum / a[i - j]; }
                sum1 *= a[i];
                Console.WriteLine("sum1 == {0}", sum1);
                Console.WriteLine("sum == {0}", sum);
                if(sum1 > sum)
                { Console.WriteLine("Yes"); }
                else
                { Console.WriteLine("No"); }
                sum = sum1;
            }
        }

        public static void d()
        {
            int n = int.Parse(Console.ReadLine());
            int[] a = Console.ReadLine().Split(' ').Select(int.Parse).ToArray();
            int sum = 1000;
            int t = 0;
            bool flg = false;
            for(int i = 0; i < n - 1; i++)
            {
                if(a[i] < a[i + 1])
                {
                    flg = true;
                    t = sum / a[i];
                    sum %= a[i];
                    sum += t * a[i + 1];
                }
            }
            if(flg == false)
            { Console.WriteLine(1000); }
            else
            { Console.WriteLine(sum); }
        }
    }
}
