#include <bits/stdc++.h>
using ll = long long;
using namespace std;
int main(void) {
  int N;
  cin >> N;
  int A[N];
  for (int i = 0; i < (N); i++) cin >> A[i];
  int cash = 1000;
  int Ns = 0;
  for (int i = 0; i < (N - 1); i++) {
    int sisan_n = cash + A[i + 1] * Ns;
    int Nsell = 0, Nbuy = 0;
    for (int s = 0; s < (Ns + 1); s++) {
      int buy_max = (cash + A[i] * s) / A[i];
      for (int b = 0; b < (buy_max + 1); b++) {
        int tmp = cash + A[i] * (s - b) + A[i + 1] * (Ns - s + b);
        if (tmp >= sisan_n) {
          Nsell = s;
          Nbuy = b;
          sisan_n = tmp;
        }
      }
    }
    Ns = Ns - Nsell + Nbuy;
    cash = cash + A[i] * (Nsell - Nbuy);
  }
  cash += A[N - 1] * Ns;
  cout << cash << endl;
  return 0;
}
