using System;
using System.Linq;
using System.Collections;
using System.Collections.Generic;
using System.Diagnostics.CodeAnalysis;
using System.Threading;

namespace ConsoleApp1
{
    class Program
    {
        static void Main(string[] args)
        {

            int N = int.Parse(Console.ReadLine());
            int[] Arr = Console.ReadLine().Split(' ').Select(int.Parse).ToArray();
            long m = 1000;

            int day = 0;
            int k = 0;
            while (true)
            {
                if (k!=0)
                {
                    m += Arr[day] * k;
                    k = 0;
                }
                if (day == N - 1)
                {
                    m += Arr[day] * k;
                    k = 0;
                    break;
                }
                if (Arr[day] < Arr[day + 1]) 
                {
                    k = (int)(m / Arr[day]);
                    m -= Arr[day] * k;
                }

                day++;
           }

            Console.WriteLine(m);


        }
    }
}
