#include <bits/stdc++.h>
using namespace std;
using vi = vector<int>;
using vll = vector<long long>;
using vs = vector<string>;
using vvi = vector<vector<int>>;
using vvll = vector<vector<long long>>;
using vvs = vector<vector<string>>;
const static string el = "\n";
long long result = 0;
vi A;
int n;
int main() {
  cin >> n;
  A = vi(n);
  for (long long i = 0; i < n; i++) {
    int tmp;
    cin >> tmp;
    A[i] = tmp;
  }
  int date = 1;
  long long money = 1000;
  long long kabu = 0;
  for (long long i = 0; i < n; i++) {
    if (A[date - 1] == A[date]) {
    } else if (A[date - 1] > A[date]) {
      int sellable = kabu;
      money += A[date - 1] * sellable;
      kabu = 0;
    } else if (A[date - 1] < A[date]) {
      int buyable = money / A[date - 1];
      money -= buyable * A[date - 1];
      kabu += buyable;
    }
    date++;
  }
  if (kabu > 0) money += kabu * A[n - 1];
  cout << money << endl;
  return 0;
}
