#include <bits/stdc++.h>
using namespace std;
int main() {
  int N;
  cin >> N;
  vector<int> A(N);
  for (int i = 0; i < N; i++) {
    cin >> A[i];
  }
  int money = 1000;
  int stock = 0;
  bool first = true;
  for (int i = 0; i < N; i++) {
    if (i < N - 1) {
      if (first && A[i] < A[i + 1]) {
        int stock_plus = floor(money / A[i]);
        money -= stock_plus * A[i];
        stock += stock_plus;
        first = false;
      }
    }
    if (!first && i > 0) {
      if (A[i] > A[i - 1]) {
        money += A[i] * stock;
        stock = 0;
      } else if (i < N - 1) {
        if (A[i] <= A[i - 1] && A[i] < A[i + 1]) {
          int stock_plus = floor(money / A[i]);
          money -= stock_plus * A[i];
          stock += stock_plus;
        }
      }
    }
  }
  cout << money << endl;
}
