#include <bits/stdc++.h>
using namespace std;
int main(void) {
  int N;
  cin >> N;
  vector<int> A(N);
  vector<int> B(N, 0);
  B[0] = 0;
  for (int i = 0; i < N; ++i) {
    cin >> A[i];
    if (i > 0 && A[i - 1] < A[i]) {
      B[i] = 1;
    } else if (i > 0 && A[i - 1] > A[i]) {
      B[i] = -1;
    }
  }
  int money = 1000;
  int stock = 0;
  bool have_stock = false;
  for (int i = 1; i < N; ++i) {
    if (B[i] == 1) {
      stock = money / A[i - 1];
      money = money % A[i - 1];
    } else if (B[i] == -1) {
      money = money + stock * A[i - 1];
      stock = 0;
    }
  }
  cout << money + stock * A[N - 1] << endl;
  return 0;
}
