using System;
using System.Collections;
using System.Collections.Generic;
using System.IO;
using System.Linq;

namespace Tasks
{
    public class D
    {
        static void Main(string[] args)
        {
            var sw = new StreamWriter(Console.OpenStandardOutput()) { AutoFlush = false };
            Console.SetOut(sw);
            Solve();
            Console.Out.Flush();
        }

        public static void Solve()
        {
            var N = int.Parse(Console.ReadLine());
            var A = Console.ReadLine().Trim().Split(' ').Select(int.Parse).ToList();
            A.Insert(0, 0);
            var dp = new int[N + 1];
            dp[1] = 1000;
            for (var i = 2; i <= N; i++)
            {
                dp[i] = dp[i - 1];
                for (var j = 1; j <= i - 1; j++)
                {
                    var stock = dp[j] / A[j];
                    var sum = dp[j] + (A[i] - A[j]) * stock;
                    dp[i] = Math.Max(dp[i], sum);
                }
            }
            var answer = dp[N];
            Console.WriteLine(answer);
        }
    }
}
