#include <bits/stdc++.h>
using ll = long long;
using namespace std;
int main(void) {
  int N;
  cin >> N;
  int A[N];
  for (int i = 0; i < (N); i++) cin >> A[i];
  int cash = 1000;
  int Ns = 0;
  for (int i = 0; i < (N - 1); i++) {
    cash += A[i] * Ns;
    if (A[i + 1] > A[i]) {
      Ns = cash / A[i];
      cash -= A[i] * Ns;
    } else {
      Ns = 0;
    }
  }
  cash += A[N - 1] * Ns;
  cout << cash << endl;
  return 0;
}
