#include <bits/stdc++.h>
using namespace std;
const int64_t mod = 1000000007;
const int64_t tmpMod = 998244353;
int main() {
  int64_t N;
  cin >> N;
  vector<int64_t> A(N);
  for (int i = 0; i < N; i++) {
    cin >> A[i];
  }
  bool trade = false;
  int stock = 0, price = 0, money = 1000;
  for (int i = 0; i < N; i++) {
    int tmp = A[i];
    trade = true;
    for (int j = i + 1; j < N; j++) {
      if (tmp >= A[j]) trade = false;
      if (!trade) break;
    }
    if (trade && stock == 0 && i != N - 1) {
      stock = money / A[i];
      price = A[i];
      money %= price;
    }
    if (stock > 0 && A[i] > price) {
      money += stock * A[i];
      stock = 0;
    }
  }
  if (stock > 0) {
    money = stock * price;
  }
  cout << money << endl;
}
