#include <bits/stdc++.h>
using namespace std;
int main() {
  int N;
  cin >> N;
  int A[N];
  for (int i = 0; i < N; i++) {
    cin >> A[i];
  }
  int money = 1000;
  int kabu = 0;
  for (int i = 0; i < N; i++) {
    if (kabu > 0) {
      if (i < N - 1) {
        if (A[i] < A[i] && A[i] > A[i + 1]) {
          money += kabu * A[i];
          kabu = 0;
        } else {
          continue;
        }
      } else {
        money += kabu * A[i];
        kabu = 0;
      }
    } else {
      if (A[i] < A[i + 1] && i < N - 1) {
        kabu = money / A[i];
        money -= kabu * A[i];
      }
    }
  }
  cout << money << endl;
}
