using System;

public class Hello
{
    public static void Main()
    {
        var n = int.Parse(Console.ReadLine().Trim());
        string[] line = Console.ReadLine().Trim().Split(' ');
        var a = Array.ConvertAll(line, int.Parse);
        getAns(n, a);
    }
    static void getAns(int n, int[] a)
    {
        var m = 1000;
        var k = 0;
        for (int i = 0; i < n - 1; i++)
        {
            m += k * a[i];
            k = 0;
            if (a[i + 1] > a[i])
            {
                k = m / a[i];
                m -= k * a[i];
            }
        }
        m += k * a[n - 1];
        Console.WriteLine(m);
    }
}
