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[80];
      line = Console.ReadLine();
      split = line.Split(' ');
      for (int i = 0; i < n; ++i)
      {
        ai[i] = Int32.Parse(split[i]);
      }

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

      //最後は全部売り
      money += (ai[n - 1] * kabu);
      kabu = 0;

      Console.WriteLine(money);

      int a = 0;
    }
  }
}
