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

namespace ConsoleApplication6
{

    class Program
    {
        static void Main(string[] args)
        {
            var N = c2i(RL());
            var Ai = RL2IE().ToList();
            var mony = 1000;
            var stock = 0;
            Ai.Add(0);
            for (int i = 0; i < N ; i++)
            {
                mony = mony + stock * Ai[i];
                stock = 0;
                if (Ai[i] < Ai[i + 1])
                {
                    stock = mony / Ai[i];
                    mony %= Ai[i];
                }
            }
            Console.WriteLine(mony);
            Console.ReadLine();

        }

        static IEnumerable<int> RL2IE() { return spr(RL()).Select(x => (int)c2i(x)); }
        static string RL() { return Console.ReadLine().Trim(); }
        static IEnumerable<string> spr(string s) { return s.Split(' '); }
        static Int64 c2i(string c) { return Int64.Parse(c); }
        //static double c2d(string c) { return double.Parse(c); }
        static string bool2ret(bool b) { return b ? "Yes" : "No"; }
    }
}
