#include <bits/stdc++.h>
using namespace std;
bool check(int i, vector<int>& A) {
  for (int j = (int)(i + 1); j < (int)(A.size()); ++j)
    if (A[i] < A[j]) return true;
  return false;
}
int main() {
  int N;
  cin >> N;
  vector<int> A(N);
  for (int i = 0; i < (int)(N); ++i) cin >> A[i];
  int money = 1000, stock = 0, price = 1e+9;
  for (int i = 0; i < (int)(N); ++i) {
    if (check(i, A) and price > A[i]) {
      while (i + 1 < N and A[i] > A[i + 1]) ++i;
      stock = money / A[i];
      money -= stock * A[i];
      price = A[i];
    } else if (A[i] > price) {
      while (i + 1 < N and A[i] < A[i + 1]) ++i;
      money += A[i] * stock;
      stock = 0;
      price = A[i];
    }
  }
  cout << money << endl;
  return 0;
}
