using System;
using static System.Console;
using static System.Math;
using System.Numerics;
using System.Collections.Generic;
using System.Linq;


namespace AtCoder
{
    public class Program
    {
        public static void Main(string[] args)
        {
            var s = Reader.readInt();
            var a = Reader.readIntArray();
            var ans = 1000;
            int kabu = 0;
            for (int i = 0; i < s - 1; i++)
            {
                if (ans > a[i])
                {
                    if (a[i + 1] > a[i])
                    {
                        kabu += ans / a[i];
                        ans -= kabu * a[i];
                        ans += kabu * a[i + 1];
                    }
                }
                if (kabu > 0)
                {
                    if (a[i] > a[i + 1])
                    {
                        ans += kabu * a[i];
                        kabu = 0;
                    }
                }
            }
            if (kabu > 0)
            {
                ans += kabu * a[s - 1];
            }
            WriteLine(ans);
            Out.Flush();

        }



    }
    public static class Reader
    {
        public static int readInt() { return int.Parse(ReadLine()); }
        public static long readLong() { return long.Parse(ReadLine()); }
        public static string reatStr() { return ReadLine(); }
        public static int[] readIntArray() { return ReadLine().Split(' ').Select(int.Parse).ToArray(); }
        public static long[] readLongArray() { return ReadLine().Split(' ').Select(long.Parse).ToArray(); }
        public static string[] readStrArray() { return ReadLine().Split(' '); }
    }


    public static class MyMath
    {
        public static long Factorical(long n)
        { return n <= 1 ? 1L : n * Factorical(n - 1); }
        public static long Permutation(long n, long m)
        { return m == 0 ? 1L : (m == n) ? Permutation(n, m - 1) : n * Permutation(n - 1, m - 1); }
        public static long Combination(long n, long m)
        { return n - m > m ? Permutation(n, m) / Factorical(m) : Permutation(n, n - m) / Factorical(n - m); }
        public static long Gcd(long n, long m)
        { return n % m == 0 ? m : Gcd(m, n % m); }
        public static long Lcm(long n, long m)
        { return n * m / Gcd(n, m); }
        public static long Pow(long n, long m)
        { return (m == 1 || m == 0) ? 1L : n * Pow(n, m - 1); }
    }


}