#include <bits/stdc++.h>
using namespace std;
void buy(int price, int& money, int& stock) {
  stock = money / price;
  money -= price * stock;
}
void sell(int price, int& money, int& stock) {
  money += price * stock;
  stock = 0;
}
int main() {
  int N;
  cin >> N;
  vector<int> A(N);
  for (int i = 0; i < N; i++) {
    cin >> A[i];
  }
  vector<bool> diff(N);
  for (int i = 1; i < N; i++) {
    diff[i] = A[i] > A[i - 1];
  }
  int last_index = 0;
  for (int i = N - 1; i >= 1; i--) {
    if (diff[i]) {
      last_index = i;
      break;
    }
  }
  int index = 1;
  int money = 1000;
  int stock = 0;
  while (index <= last_index) {
    while (!diff[index]) index++;
    buy(A[index - 1], money, stock);
    while (diff[index]) index++;
    sell(A[index - 1], money, stock);
  }
  cout << money << endl;
}
