using System;
using System.Collections;
using System.Collections.Generic;
using System.Text;
using System.Linq;

namespace contest_Csharp
{
    class Program
    {
        public static (int m,int s)[,] dp;

        static void Main(string[] args)
        {
            checked
            {
                var sw = new System.IO.StreamWriter(Console.OpenStandardOutput()) { AutoFlush = false };
                Console.SetOut(sw);

                var vals = Console.ReadLine().Split(' ').
                    Select(x => int.Parse(x)).ToList();

                var N = vals[0];
                //var K = vals[1];
                //var B = vals[2];
                var A= Console.ReadLine().Split(' ').
                    Select(x => int.Parse(x)).ToList();
                dp = new (int,int)[N + 1, 2];
                dp[0, 0] = (1000, 0);
                dp[0, 1] = (1000, 0);
                for (int i = 0; i < N; i++)
                {
                    if (dp[i,0].m>=dp[i,1].m+dp[i,1].s*A[i])
                    {
                        dp[i + 1, 0] = dp[i, 0];
                    }
                    else
                    {
                        dp[i + 1, 0] = (dp[i, 1].m + dp[i, 1].s * A[i],0);
                    }
                    if (dp[i,0].m/A[i] >=dp[i,1].s+ dp[i, 1].m / A[i] &&
                        dp[i, 0].m % A[i]>= dp[i, 1].m % A[i])
                    {
                        dp[i + 1, 1] = (dp[i, 0].m %A[i] , dp[i, 0].m / A[i]);
                    }
                    else
                    {
                        dp[i + 1, 1] = (dp[i, 1].m % A[i], dp[i,1].s+dp[i, 1].m / A[i]);
                    }
                }

                Console.WriteLine(dp[N,0].m);







                Console.Out.Flush();
            }




        }
    }
}


