using System;
using System.Linq;

class name
{
    static void Main()
    {

        long[] day = Console.ReadLine().Split().Select(long.Parse).ToArray();
        long[] money = Console.ReadLine().Split().Select(long.Parse).ToArray();
        long d = day[0];
        long g = 1000;
        int st = 0;
       for(int s = 0; s < d-1; s++)
        {

            if (money[s] < money[s + 1])
            {
                st = g / money[s];
                g += (money[s + 1] - money[s]) * st;

            }


        }
        Console.WriteLine(g);
    }



}