using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace ConsoleApplication1
{
  class Program
  {
    static void Main(string[] args)
    {
      string line = Console.ReadLine();
      string[] split = line.Split(' ');
      int n = Int32.Parse(split[0]);

      int[] ai = new int[81];
      line = Console.ReadLine();
      split = line.Split(' ');
      for (int i = 0; i < n; ++i)
      {
        ai[i] = Int32.Parse(split[i]);
      }
      ai[n] = -1;

      int money = 1000;
      int kabu = 0;
      for (int i = 0; i < n; ++i)
      {
        // 翌日が上がるなら買い
        if (ai[i] < ai[i + 1])
        {
          if (money / ai[i] > 0)
          {
            kabu = money / ai[i];
            money -= (ai[i] * kabu);
          }
        }
        // 翌日が下がるなら売り
        else if (ai[i] > ai[i + 1])
        {
          money += (ai[i] * kabu);
          kabu = 0;
        }
      }

      Console.WriteLine(money);

      int a = 0;
    }
  }
}
