using System;
using System.Linq;
 
class D
{
    static void Main()
    {
        int N = int.Parse(Console.ReadLine());
        var A = (Console.ReadLine()).Split(' ').Select(s => long.Parse(s)).ToArray();

        var Sum = 1000L;
        var Stock = 0L;

        for (int i = 0; i < N - 1; i++)
        {
            if (A[i + 1] < A[i])
            {
                Sum += A[i] * Stock;
                Stock = 0;
            }
            else if (A[i + 1] > A[i])
            {
                Stock = Sum / A[i];
                Sum -= Stock * A[i];
            }
        }
        if (Stock != 0)
        {
            Sum = Sum + A[A.Length - 1] * Stock;
            Stock = 0;
        }
        Console.WriteLine(Sum.ToString());
    }
}