#include <bits/stdc++.h>
using namespace std;
void next(vector<int>& A) {
  A[0]++;
  for (int i = 0; i < A.size() - 1; i++) {
    if (A[i] > 2) {
      A[i + 1]++;
      A[i] = 0;
    } else {
      break;
    }
  }
}
void buy(int& money, int& stock, int price) {
  int count = money / price;
  stock += count;
  money -= price * count;
}
void sell(int& money, int& stock, int price) {
  money += stock * price;
  stock = 0;
}
int main(void) {
  int N;
  cin >> N;
  vector<int> A(N);
  for (int i = 0; i < N; i++) {
    cin >> A[i];
  }
  int money = 1000;
  int stock = 0;
  int mode = 0;
  for (int i = 0; i < N - 1; i++) {
    if (mode == 0) {
      if (A[i] <= A[i + 1]) {
        buy(money, stock, A[i]);
        mode = 1;
      }
    } else if (mode == 1) {
      if (A[i] >= A[i + 1]) {
        sell(money, stock, A[i]);
        mode = 0;
      }
    }
  }
  sell(money, stock, A[N - 1]);
  cout << money << endl;
  return 0;
}
